Code: Select all
bind notc - "*please identify to NickServ now*" identify:nick
bind notc - "*password accepted*" self:op
proc identify:nick {nick uhost hand dest arg} {
if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {
putserv "PRIVMSG nickserv :identify PASS"
}
}
proc self:op {nick uhost hand dest arg} {
if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {
foreach chan [channels] {
putserv "PRIVMSG chanserv :op $chan $::botnick"
}
}
}
Confirmation from nickserv is:this will let the bot identify on notice and op itself when password accepted.
dont forget to edit the PASS and the password accepted message (if needed) to suit you.
Tcl error [self:op]: syntax error in expression "([string tolower $dest] == [string tolower $::botnick]) && (...": variable references require preceding $
Code: Select all
if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {
Code: Select all
if {([string tolower $dest] == [string tolower $::botnick]) && ([string tolower $nick] == "nickserv")} {
Code: Select all
if {("[string tolower $dest]" == "[string tolower $::botnick]") && ("$nick" == "NickServ")} {