|
|
|
|
snippet / $tjoin(chan,nick,network).dur | | |
|
|
|
 622 downloads, 1 today
|

| | | |
 |
|
|
» $tjoin(chan,nick,network).dur [2.8KiB] by .
|
|
|
| Average: | (3.5/5) |
| Documentation: | |
| Functionality: | (3/5)This snippet returns the amount of seconds that the specified nick has been on the active channel, or the channel that you specify. Additionally, it also allows you to specify a network.
In order to provide this functionality, the author uses an on join event, to add the nickname to a hash table, that has as part of its name the name of the channel, and the name of the network. Because of this, the snippet will not function properly on servers that are not part of a network.
I would advise to the author not to use the -c switch with /hinc. This makes mIRC have to increment the hash table value each second, for each hash table entry in each hash table, something that can become quite an intensive task if you have hundreds of nicknames in your hash table. Preferable would be to store a $ctime as value of the hash table item, and to calculate $calc($ctime - $hget(table,$nick)) for the amount of seconds that a nickname has been on the channel/network.
There is the option to specify the .dur property, which will make the returned number of seconds formatted with the use of the $duration identifier.
Unfortunately, because the author uses an on join event, this identifier will only work on nicknames that have joined after you have. The author should include some aliases that fill the hash tables with all the nicknames upon loading of the addon. It would still not give an accurate measure of how long a nickname has been on a certain channel (because you can't know it), but atleast it would be better than nothing. |
| Design: | Not rated This is a text based snippet which doesn't require a design rating. |
| Overall: | All in all, an identifier that isn't entirely useful, although some might find a use for it. The coding is not bad, has some error checking, but could be improved to leave out some redundant coding. Also be aware that not every server is part of a network, some servers don't have a value for the $network identifier, which will give unrequired results. Finally, it would be a good idea to do some initializing when the snippet is loaded, and to add in your documentation how exactly this snippet works. You shoud do this, because upon loading this snippet, nothing will work, which may cause the user to think the snippet's coding is faulty. |
| Reviewed by FiberOPtics. | |
|
|
|
Comments | |
|
You must be registered and logged in to be able to post comments.
|
|
|
|
Copyright © mIRC Scripting Network 1999-2010.
If you have found a bug, please send a pmsg to wiggle or tye (pmsg).
Page compiled in 0.258s.
|
| | | |
35 visitors online (0 registered / 35 guests).
Using GZIP Compression. You just ate 7.92 kb of our traffic.
| | |
|
|
|
|