# DCC COMMANDS:
#
# .onjoin add <#channel> <flag> <msg>
# - to make a onjoin message for <flag> informations about flags given with
# .onjoin flags
# - if <#channel> is * or -, then this will work on all channels which the bot
# is on.
# - You can add in the <msg>:
# %b - which will be replaced with: My nick, the botnick.
# %n - Will be replaced with: The nick of the person which we msg.
# %c - Will be replaced with: The channel which the person joined.
# %t - Will be replaced with: Current time and date.
#
# .onjoin rem <number of msg>
# - Remove a message. U can find the <number of msg> with
# .onjoin messages which lists the messages.
#
# .onjoin messages
# - gives you list of the added onjoin messages..
#
# .onjoin flags
# - shows list of flags which flagonjoin allows with description of every
# flag.
Code: Select all
if {$command == "flags"} {
putidx $idx "\n FlagOnJoin $flagver FLAGS:"
putidx $idx ""
putidx $idx " FLAG DESCRIPTION"
putidx $idx "-----------------------------------------------------------"
putidx $idx " +n Owner."
putidx $idx " +m Master."
putidx $idx " +o Op."
putidx $idx " +t Botnet master."
putidx $idx " +f Friend."
putidx $idx " +j Janitor."
putidx $idx " +v Voice."
putidx $idx " +x File system access."
putidx $idx " +a Auto-op."
putidx $idx " - For everyone."
putidx $idx " * For everyone."
putidx $idx " nonusers For people which ain't added in the bot."
putidx $idx "-----------------------------------------------------------"
putidx $idx " end of flags."
return
}
### info [channel] [info-line]
Sets your info line. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when you join the channel. If the info line begins with an '@', then it is "locked", and you may no longer change it.
See also: chinfo
### chinfo <user> [channel] [info-line/none]
Sets the information line for a user. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when the user joins the channel. If the info line begins with an '@', then it is "locked", and that user may no longer change it. If the channel name is omitted, the default info line is changed. If you specify 'none' as the info-line, it will be erased.
Code: Select all
bind join - * pub:join
proc pub:join {nick uhost hand chan} {
if {[matchattr $hand Z|- $chan]} {putserv "privmsg $chan :owner entered"} else {
if {[matchattr $hand -|o $chan]} {putserv "privmsg $chan :op entered"} else {
if {[matchattr $hand -|- $chan]} {putserv "privmsg $chan :no flag user"} else {
if {[matchattr $hand -|- $chan] == 0} {putserv "privmsg $chan :no user from userlist"}
}
}
}
}
Code: Select all
# The configuration
set flags(owner) "A Bot Owner Has Entered The Channel!"
set flags(master) "A Bot Master Has Entered The Channel!"
set flags(op) "A Bot Op Has Entered The Channel!"
set flags(halfop) "A Bot Halfop Has Entered The Channel!"
set flags(cowner) "A Channel Owner Has Entered The Channel!"
set flags(cmaster) "A Channel Master Has Entered The Channel!"
set flags(cop) "A Channel Op Has Entered The Channel!"
set flags(chalfop) "A Channel Halfop Has Entered The Channel!"
bind JOIN- * flags:join
proc flags:join { nickname hostname handle channel } {
global flags
if {[matchattr $handle n]} { putquick "PRIVMSG $channel :$flags(owner)"
} elseif {[matchattr $handle m]} { putquick "PRIVMSG $channel :$flags(master)"
} elseif {[matchattr $handle o]} { putquick "PRIVMSG $channel :$flags(op)"
} elseif {[matchattr $handle l]} { putquick "PRIVMSG $channel :$flags(halfop)"
} elseif {[matchattr $handle |n $channel]} { putquick "PRIVMSG $channel :$flags(cowner)"
} elseif {[matchattr $handle |m $channel]} { putquick "PRIVMSG $channel :$flags(cmaster)"
} elseif {[matchattr $handle |o $channel]} { putquick "PRIVMSG $channel :$flags(cop)"
} elseif {[matchattr $handle |l $channel]} { putquick "PRIVMSG $channel :$flags(chalfop)"
}
}
Greeting, I've set my .info as well as .chinfo and it have been successfully setted but however when I set a channel +greet on and I joined the channel, it doesn't greet me. Why is that so?Alchera wrote:Via the Command Console:### info [channel] [info-line]
Sets your info line. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when you join the channel. If the info line begins with an '@', then it is "locked", and you may no longer change it.
See also: chinfo### chinfo <user> [channel] [info-line/none]
Sets the information line for a user. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when the user joins the channel. If the info line begins with an '@', then it is "locked", and that user may no longer change it. If the channel name is omitted, the default info line is changed. If you specify 'none' as the info-line, it will be erased.
Firstly thanks for your code! But I've tried it, it doesn't seems to work for the first time due to some error so I've changed this "bind JOIN-" to "bind JOIN" but still it doesn't work. I've added a new user and chatter +n to the user but when the user joined, nothing happens.MeTroiD wrote:I was kind of bored so here you go
Code: Select all
# The configuration set flags(owner) "A Bot Owner Has Entered The Channel!" set flags(master) "A Bot Master Has Entered The Channel!" set flags(op) "A Bot Op Has Entered The Channel!" set flags(halfop) "A Bot Halfop Has Entered The Channel!" set flags(cowner) "A Channel Owner Has Entered The Channel!" set flags(cmaster) "A Channel Master Has Entered The Channel!" set flags(cop) "A Channel Op Has Entered The Channel!" set flags(chalfop) "A Channel Halfop Has Entered The Channel!" bind JOIN- * flags:join proc flags:join { nickname hostname handle channel } { global flags if {[matchattr $handle n]} { putquick "PRIVMSG $channel :$flags(owner)" } elseif {[matchattr $handle m]} { putquick "PRIVMSG $channel :$flags(master)" } elseif {[matchattr $handle o]} { putquick "PRIVMSG $channel :$flags(op)" } elseif {[matchattr $handle l]} { putquick "PRIVMSG $channel :$flags(halfop)" } elseif {[matchattr $handle |n $channel]} { putquick "PRIVMSG $channel :$flags(cowner)" } elseif {[matchattr $handle |m $channel]} { putquick "PRIVMSG $channel :$flags(cmaster)" } elseif {[matchattr $handle |o $channel]} { putquick "PRIVMSG $channel :$flags(cop)" } elseif {[matchattr $handle |l $channel]} { putquick "PRIVMSG $channel :$flags(chalfop)" } }
hehe... you should have changed "JOIN-" to "JOIN -"Stealthx wrote: Firstly thanks for your code! But I've tried it, it doesn't seems to work for the first time due to some error so I've changed this "bind JOIN-" to "bind JOIN" but still it doesn't work. I've added a new user and chatter +n to the user but when the user joined, nothing happens.