Hello!
I need a script which can do the following:
With a command e.g. !mods I want to check the online status of saved nicks. Maybe it is possible to save these nicks in an array(?). Then my eggdrop should write "Online: nick1, nick2, nick3" or "nobody is online".
Last edited by darton on Tue May 30, 2006 9:11 am, edited 1 time in total.
bind pub - !mods mods
proc mods {nick uhost hand chan arg} {
array set modnames {
nick1
nick2
nick3
}
foreach {mod} [array get modnames] {
if {[onchan $mod $chan]} {
putquick "PRIVMSG $chan :The following mods are online at IRC: $mod"
}
}
}
I have already begun with making this script. There is only one problem. With this script I made, the bot writes the following:
The following mods are online at IRC: nick1
The following mods are online at IRC: nick2
But it should write these nicks in just one line like this: "The following mods are online at IRC: nick1, nick2"
What do I have to change so that a new line is not made each time?
And the second problem is that I dont know what I must add that my bot writes "Nobody is online" when there is no user at IRC. Please help me.