Code: Select all
bind pubm - "*" private:talk
set nick1 "awyeah"
set channel1 "#elite"
set msg1 "I am a bot!"
proc private:talk {nick uhost hand chan text} {
global botnick nick1 channel1 msg1
if {([string equal -nocase $chan $channel1]) && ([string equal -nocase $nick $nick1]) && (![string equal -nocase $botnick $nick])} {
set text [lindex $text 0]; putserv "PRIVMSG $text :$msg1"
return 0
}
}
Code: Select all
bind pubm - "*" private:talk
set nick1 "awyeah"
set msg1 "I am a bot!"
proc private:talk {nick uhost hand chan text} {
global botnick nick1 msg1
if {([string equal -nocase $nick $nick1]) && (![string equal -nocase $botnick $nick])} {
set text [lindex $text 0]; putserv "PRIVMSG $text :$msg1"
return 0
}
}
Code: Select all
bind pubm - "*" private:talk
set nick1 "awyeah"
set msg1 "I am a bot!"
proc private:talk {nick uhost hand chan text} {
global botnick nick1 msg1
if {([string equal -nocase $nick $nick1]) && (![string equal -nocase $botnick $nick])} {
set text [lindex $text 0]; putserv "PRIVMSG $text :$msg1"
return 0
}
}
Code: Select all
proc name { bla bla } {
global bla
...........
...........
if {($bla == $bla1)} { set CMSG "PRIVMSG" }
if {($bla == $bla2)} { set CMSG "NOTICE" }
putserv "$CMSG $text :$msg1"
.................
}
}