I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
You may find this useful it safes having to enter the partyline to add channels in the bots private message just type addchan #channelnamescyzernix wrote:I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
Code: Select all
bind msg n addchan addchan
proc addchan {nick host hand text} {
set chan [join [lindex [split $text] 0]]
if {![string length $chan]} {
putserv "PRIVMSG $nick :You need to specify which channel to join."
return 0
}
if {[validchan $chan]} {
if {[channel get $chan "inactive"]} {
channel set $chan -inactive
return 0
}
putserv "PRIVMSG $nick :I am already on $chan."
return 0
}
channel add $chan
}
bind msg n delchan delchan
proc delchan {nick host hand text} {
set chan [join [lindex [split $text] 0]]
if {![string length $chan]} {
putserv "PRIVMSG $nick :You need to specify which channel to remove."
return 0
}
if {![validchan $chan]} {
putserv "PRIVMSG $nick :Unknown channel: $chan."
return 0
}
channel remove $chan
}
Lol. That, I know. Thanks for answering the RTMF ques.nml375 wrote:Hi,
Though not a 'dumb' kind of question, it might be a RTFM kind..
That said, up until 1.6.19 (inclusive), the usual way of adding (static) channels were through the config file using the 'channel add' command. Further channels could also be added on-the-fly using the .+chan dcc-partyline command.
As I roughly recall, the .+chan command is the preferred way since 1.6.20.
Thanks, I have to try this one out. The code should be pasted in the .conf correct?blake wrote:You may find this useful it safes having to enter the partyline to add channels in the bots private message just type addchan #channelnamescyzernix wrote:I know it's kinda a dumb question
but seriously, how do I assign my bot to a channel.
Been searching everywhere but cant seem to find out.
Code: Select all
bind msg n addchan addchan proc addchan {nick host hand text} { set chan [join [lindex [split $text] 0]] if {![string length $chan]} { putserv "PRIVMSG $nick :You need to specify which channel to join." return 0 } if {[validchan $chan]} { if {[channel get $chan "inactive"]} { channel set $chan -inactive return 0 } putserv "PRIVMSG $nick :I am already on $chan." return 0 } channel add $chan } bind msg n delchan delchan proc delchan {nick host hand text} { set chan [join [lindex [split $text] 0]] if {![string length $chan]} { putserv "PRIVMSG $nick :You need to specify which channel to remove." return 0 } if {![validchan $chan]} { putserv "PRIVMSG $nick :Unknown channel: $chan." return 0 } channel remove $chan }