Looking for some help on a on join script
I can do the normal on join scripts easy ($nicks joins room and command is done) but I am stuck with if I join a room I want the script to check the nicklist for a certain username (username be placed in the script its self) and if the user was is the room it returns $nick is in $chan or if the user is not in the room it returns $nick is not in the room.
How do I get a self on join script to check the rooms nick list for a certain user, can this be done?
Hope this makes sense.
Thanks
I cant seem to get it to work, No matter how I put it, It always returns that the nickname is not in the room when it is. I've tried these ways and none work
on me:*:JOIN:#: {
if (nickname ison $chan) { echo NICKNAME is here! }
else { echo NICKNAME is not here! }
}
on me:*:JOIN:#: {
if (NICKNAME ison $chan) { echo NICKNAME is here! }
if (NICKNAME !ison $chan) { echo NICKNAME is not here! }
}
on me:*:JOIN:#: {
set %nick NICKNAME
if (%nick ison $chan) { echo NICKNAME is here! }
else { echo NICKNAME is not here! }
}
Totally lost with this lol
The 'me:' prefix means the event only matches when you triggered the event. When you join a room there is only 1 nickname in the nick list (yours) until you receive the NAMES list, so if you're trying to make a script that checks for a specific nickname whenever you join a room you will either have to add a delay to the check (which may be unreliable) or use the raw numeric from the end of the NAMES message.
If you have more questions I'm in #mSL on irc.swiftirc.net
if (CHECKED_NICK ison #) { do stuff }