!nickinfo (gets nick info)

Platform:  mIRC
Published  Mar 17, 2011
Updated  Mar 18, 2011

Screenshots

Hello hawkee, Today i publish my !nickinfo script.

It says if the nick is:
- Online.
- Offline.
- avaible for registering.
- Frozen/Suspended. on *:Text:!nickinfo *:#:{
set %nickinfonick $2
set %nickinfochan $chan
ns info $2
}

on *:notice:*:*:{
if ($nick == NickServ) {
if (nickinfo isin $1-) { msg %nickinfochan The nick %nickinfonick is currently frozen! | halt }
if (may not be isin $1-) { msg %nickinfochan The nick %nickinfonick may not be registered or used. | halt }
if (is online from isin $1-) { msg %nickinfochan The nick %nickinfonick is currently 3Online | halt }
if (last seen address isin $1-) { msg %nickinfochan The nick %nickinfonick is currently 4Offline | halt }
if (isn't registered isin $1-) { msg %nickinfochan This nick is availbe for Registering. | halt }
if (is currently online. isin $1-) { msg %nickinfochan The nick %nickinfonick is currently 3Online | halt }
}
}

Comments

Sign in to comment.
Callumlord   -  Mar 27, 2011
Nope sorry it is working :P
 Respond  
Callumlord   -  Mar 27, 2011
Slight problem finding if they are offline. :(
 Respond  
Callumlord   -  Mar 27, 2011
Ok got it
 Respond  
Callumlord   -  Mar 26, 2011
it is not working
 Respond  
Aha2Y   -  Mar 18, 2011
Edited.
 Respond  
Aucun50   -  Mar 18, 2011
I agree. Either way works, your example is just a different version.
 Respond  
Jethro   -  Mar 18, 2011
Yes, but you have it /unset. That is literally the same as using

/var %var value

or

/set -l %var value

the -l switch is undocumented and indicates it's a local variable, too. Thus if you were making an example in conjunction with his code, the unset command was not meant to be there.
 Respond  
Aucun50   -  Mar 18, 2011
I was using the global var rather then the local because in his script he uses the global. Trying not to confuse here.
 Respond  
Jethro   -  Mar 18, 2011
Even though you like the idea of using $gettok, there was no reason to set the global var for that and then unset it at the end of the routine. The example you've demonstrated is fitting with a local variable, and that's what /var is made for...
 Respond  
Aucun50   -  Mar 18, 2011
I was never a fan of that, I like using $gettok as it makes it easier for me to read.
 Respond  
Jethro   -  Mar 18, 2011
Auncun50,

Code

 
 Respond  
Aucun50   -  Mar 18, 2011
I agree with _Dean_. Also why would you want to check your own nickname, if you loaded the script then it's clearly you or your bot. Another small little thing, not a big deal but can save on how many vars your have set. If you set one var with both the name and channel in it then use tokens after you don't need two vars.

Here is a little example.

Code

 
 Respond  
SunnyD   -  Mar 18, 2011
Agree'd with Dean. Not sure if you'd even need that if statement.
 Respond  
_Dean_   -  Mar 17, 2011
i think u need to change it...

Code

 
 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.