This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Tue Aug 19, 2003 6:13 am
i've got a problem in scripting this. If u wan to ban someone in channel rite? but u dun wan it to be public so u msg bot and type a command so it will excute a command. the commands i having trouble is kick, kickban and ban and unban i hope your would give me a help.
z_one
Master
Posts: 269 Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada
Post
by z_one » Tue Aug 19, 2003 6:37 am
In the bot's pvt type:
cmd kick #channel nick
where #channel is the channel you want to kick nick from.
You must have master (m) or owner (n) flags for this to work.
Code: Select all
bind msg m "cmd" mypvtcommand
proc mypvtcommand {nick host hand arg} {
if {$arg == ""} { return }
set theaction [string tolower [lindex $arg 0]]
set thechan [string tolower [lindex $arg 1]]
set thenick [string tolower [lindex $arg 2]]
switch -exact $theaction {
kick {
if {[onchan $thenick $thechan]} {
putkick $thechan $thenick
}
}
}
}
I'm sure you can figure out the rest (how to ban or kick ban)
Hint: use
getchanhost to get the host of the nick you need to ban.
z_one
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 21, 2003 5:32 am
hmm.. okie.. i got it working.. but then how to make a stick ban? i'm not quite sure.... sorry... to trouble... you all...
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Thu Aug 21, 2003 6:14 am
### stick [ban/exempt/invite] <hostmask/number> [channel]
Makes a ban, exempt, or invite "sticky". This means that the bot will always try to keep it active on the channel, even if the channel is using dynamic bans. Obviously, if the channel isn't using dynamic bans, this has no effect.
See also: bans, exempts, invites, unstick, +ban, +exempt, +invite
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Aug 21, 2003 7:29 am
also u can do it like this:
newchanban <channel> <ban> <creator> <comment> [lifetime] [options]
in your case
[option] would be sticky.
for example:
newchanban $chan $ban cmdscript "$reason" 10 sticky
this would create a 10 minutes sticky ban.
Options:
sticky: forces the ban to be always active on a channel, even
with dynamicbans on
none: no effect
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 21, 2003 10:39 am
i tried but it wont work i make something like this:
bind msg m "!cmd" mypvtcommand
proc mypvtcommand {nick host hand arg} {
if {$arg == ""} { return }
set theaction [string tolower [lindex $arg 0]]
set thechan [string tolower [lindex $arg 1]]
set thenick [string tolower [lindex $arg 2]]
set reasons [string tolower [lindex $arg 3]]
switch -exact $theaction {
kick {
if {[onchan $thenick $thechan]} {
putkick $thechan $thenick $reasons
}
}
ban {
if {[onchan $thenick $thechan]} {
set gethost [ getchanhost $thenick $thechan ]
newchanban $thechan $gethost $nick - 10 sticky
putkick $thechan $thenick $reasons
}
}
}
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Aug 21, 2003 11:18 am
try:
newchanban $thechan $gethost cmdcript "-" 10 sticky
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 21, 2003 12:32 pm
hmm.. tried that it cant work