script for bot to send commands to irc (chanserv nickserv)

Old posts that have not been replied to for several years.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

MnM wrote:One more:

init-server - this is for when joining the server

how about when joining the chan insted of server?

Thanks guys I really appreciate your help.
that's "bind join", but I've got the feeling this is what you want:

Code: Select all

bind need - "* op" needop
proc needop {c t} {putserv "PRIVMSG target :op me on $c!"}
Last edited by user on Fri Jan 07, 2005 10:17 pm, edited 2 times in total.
Have you ever read "The Manual"?
User avatar
sofit
Voice
Posts: 2
Joined: Fri Jan 07, 2005 9:14 am
Location: Razgrad, Bulgaria
Contact:

Post by sofit »

Why would you ever need that? The script should look something like:

Code: Select all

bind join - * join:proc

proc join:proc {nick uhost hand chan} {
  if {[isbotnick $nick]} {
    putserv "PRIVMSG target :message"
  }
}
But anyway, the bot would then msg the target everytime it joins a channel (you want it only when the bot joins a channel right?). And this will be for all channels it joins...
Kind regards,
Stanislav Zahariev
Locked