Jethro commented on a Page, Kings Of Chaos Stats Checker.  -  Mar 13, 2011

SunnyD wrote:> Instead of setting a global variable and using it once in one line of code wouldn't it be more beneficial to just take the contents of the variable and place it where it is used, and take out the whole variable all together?because the $nick and $chan become $null when used throughout the socket routine. In other words, you cannot place them directly in the socket events; they simply won't work. You have to have a gateway to store them in order for the socket to reference them successfully. The sockmark command and $sock($sockname).mark have been created for this reason, so you can use them to store info.

Hash table, exceptionally, can be used for storing binary info when you fetch data to store in the binary variables. The -b switch for the hash table is there for such purpose:

hadd -mb hashtable item &data

for instance.

Other than that, I don't get why people keep avoiding them and using variable and hash tables for socket operation.

SunnyD wrote:> I am still trying to find out where exactly you use %nick because i can't find one instance of it other than stating it.> set %url /mstats.php?n= $+ $2
set %nick $2As you can see, the $2 should have been the %nick, but it was disregarded for some reason.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.