| View previous topic :: View next topic |
| Author |
Message |
panasonic Voice
Joined: 15 Sep 2007 Posts: 25
|
Posted: Wed Dec 05, 2007 2:18 pm Post subject: Bot to msg during channel join |
|
|
hi!
i am trying to make my bot to notify user that the bot is now Online and the user can start using the bot commands
i have tried with this script but it wont works
| Code: | bind join - #channel bot:joined
proc bot:joined {nick uhost hand chan} {
if {[isbotnick user1 user2 user3] && [string equal -nocase #channel $chan]} {
utimer 15 [ putserv "PRIVMSG user1 user2 user3: "I am online now. My commands are available by typing !commands at #channel."]
}
}
putlog "Bot ready script - loaded" |
but the user did not receive any message while the bot joining the channel now
the purpose of this script is just to notify user1, user2 and user3 that my bot is online and they can start using the bot
i have another script for !commands
any advice is appeciated |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Dec 05, 2007 7:42 pm Post subject: Re: Bot to msg during channel join |
|
|
| panasonic wrote: | hi!
i am trying to make my bot to notify user that the bot is now Online and the user can start using the bot commands
i have tried with this script but it wont works |
Try this script... | Code: | variable yourchannel "#channel"
variable nickalerts "nick1 nick2 nick3"
bind join - $::yourchannel bot:joined
proc bot:joined {nick uhost hand chan} {
if {[isbotnick $nick]} {
foreach n [split $::nickalerts] {
putserv "PRIVMSG $n :I am online now. My commands are available by typing !commands on $::yourchannel."
}
}
} |
edit: fixed; as per user's observation noted below. 
Last edited by speechles on Thu Dec 06, 2007 7:58 pm; edited 3 times in total |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Dec 06, 2007 8:17 am Post subject: Re: Bot to msg during channel join |
|
|
| speechles wrote: | | Code: | ::$yourchannel
...
::$nickalerts |
|
make that _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
|