# 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)"
}
}
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.
hehe... you should have changed "JOIN-" to "JOIN -"
Thanks alot, it's work well now. But how do I set those on-join message like:
<bot> [ usernick ] have just joined the channel.
etc.
<bot> [ egghelp ] have just joined the channel.
whereby "egghelp" is my nick in IRC. I've tried $nick but it appear to be the bot nick.
On another note Stealthx, When you see an error on your partyline it useally shows you quite clearly what you need to change to make it work.
Don't go around deleting stuff or changing the code if you don't know what the outcome will be
Stealthx wrote:however when I set a channel +greet on and I joined the channel, it doesn't greet me. Why is that so?
Setting a greeting via Command Console and cycling immediately won't trigger a greeting as it's timed; you have to be absent from the channel for a short period and then re-enter.
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM