Code: Select all
bind dcc -|- mul dcc:mul
proc dcc:mul {hand idx arg chan}
{
#to join channel c1 specified in $chan
if {[string equal -nocase "#c1" $chan]}
{
if {[validchan "#c1"]}
{
if {[botonchan]}
{
#do sth else if the bot is already on this channel
}
else{
if {[channel get $chan inactive]}
{#join c1 channel
JOIN $chan
}
}
}
}
}
Code: Select all
bind dcc * mul dcc:mul
proc dcc:mul {hand idx text} {
# grab the channel from user's input in $chan variable and warn if no channel is specified
if {[scan $text %s chan] != 1} {
putdcc $idx "Syntax: .mul #channel"
return
}
# check if channel is valid
if {[validchan $chan]} {
# continue with checking if bot is on the channel
if {![botonchan $chan]} {
# check is the channel is set to +inactive
if {[channel get $chan inactive]} {
putdcc $idx "Channel $chan is set to +inactive"
} else {
putdcc $idx "I'm not on $chan channel due to one of the following reasons: I'm banned, channel is set to invite only or need a key to join"
}
}
} else {
# we add the new channel
channel add $chan
}
}
Code: Select all
if {[scan $text %s chan] != 1} {
Code: Select all
utimer 5 [list putserv "PRIVMSG $chan :something"]
Code: Select all
channel add $chan
Code: Select all
proc timed:message {chan} {
putserv "PRIVMSG $chan :something"
# and any other things you wish
}
Code: Select all
utimer 5 [list timed:message $chan]