Code: Select all
set ::mainchan "#channel"
bind msgm - * msg:mainchan
proc msg:mainchan {nick host hand arg} {
puthelp "PRIVMSG $::mainchan "$nick Query: $arg"
puthelp "PRIVMSG $nick :Sorry I'm a Eggdrop..."
}
Code: Select all
set ::mainchan "#channel"
bind msgm - * msg:mainchan
proc msg:mainchan {nick host hand arg} {
puthelp "PRIVMSG $::mainchan :$nick Query: $arg"
puthelp "PRIVMSG $nick :Sorry I'm a Eggdrop..."
}
Code: Select all
bind msg - !say msg_say
proc msg_say {nick uhost hand args} {
global botnick
if {[llength [lindex $args 0]]<2} {
putserv "NOTICE $nick :/msg $botnick !say <#chan> <something to say>"
} else {
set chan [lindex [lindex $args 0] 0]
if { ![validchan $chan]} {
putserv "NOTICE $nick :\"$chan\": invalid chan."
return 0
}
set msg [lrange [lindex $args 0] 1 end]
}
#putchan $chan $msg
putserv "PRIVMSG $chan :$msg"
}
Code: Select all
bind msg - !say msg_say
proc msg_say {nick uhost hand arg} {
if {$arg == ""} {
putserv "NOTICE $nick :Syntax: /msg $::botnick $::lastbind <#channel> <message>."
} else {
set chan [lindex [split $arg] 0]
set message [lrange $arg 1 end]
if {[string index $chan 0] != "#"} {
putserv "NOTICE $nick :Channel must start with '#'."
} elseif {![validchan $chan]} {
putserv "NOTICE $nick :Invalid channel '$chan'."
} elseif {$message == ""} {
putserv "NOTICE $nick :No message entered. Please use: /msg $::botnick !say $chan <message here>."
} else {
putserv "PRIVMSG $chan :$message"
putserv "NOTICE $nick :Message sent to $chan."
}
}
Code: Select all
bind msg - !say msg_say
proc msg_say {nick uhost hand arg} {
if {$arg == ""} {
putserv "NOTICE $nick :Syntax: /msg $::botnick $::lastbind <#channel> <message>."
} else {
set chan [lindex [split $arg] 0]
set message [join [lrange [split $arg] 1 end]]
if {[string index $chan 0] != "#"} {
putserv "NOTICE $nick :Channel must start with '#'."
} elseif {![validchan $chan]} {
putserv "NOTICE $nick :Invalid channel '$chan'."
} elseif {$message == ""} {
putserv "NOTICE $nick :No message entered. Please use: /msg $::botnick !say $chan <message here>."
} else {
putserv "PRIVMSG $chan :$message"
putserv "NOTICE $nick :Message sent to $chan."
}
}
}
Code: Select all
bind msg - !say msg_say
proc msg_say {nick uhost hand arg} {
if {[llength [set arg [split $arg]]] < 2} {
putserv "NOTICE $nick :Syntax: /msg $::botnick $::lastbind <#channel> <message>."
} else {
if {[string index [set chan [lindex $arg 0]] != "#" || ![validchan $chan]} {
putserv "NOTICE $nick :Invalid channel '$chan'."
} else {
putserv "PRIVMSG $chan :[join [lrange $arg 1 end]]"
putserv "NOTICE $nick :Message sent to $chan."
}
}
}