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.
MINImi
Voice
Posts: 30 Joined: Sat Oct 11, 2003 6:52 am
Post
by MINImi » Tue Oct 14, 2003 1:49 pm
hi
i need a script for the bot that unset all the bans which the bots sets with a command
i dont mean the channel bans
i mean the bans which are in the bots memory, dynamic bans:)
i hope you unterstand me
CrazyCat
Revered One
Posts: 1304 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Wed Oct 15, 2003 3:58 am
something like:
Code: Select all
foreach thisban [bans] {
unban $thisban
}
This is totally false, but the principe is this
just adapt it
MINImi
Voice
Posts: 30 Joined: Sat Oct 11, 2003 6:52 am
Post
by MINImi » Wed Oct 15, 2003 8:07 am
i think i better need a complete script
CrazyCat
Revered One
Posts: 1304 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Wed Oct 15, 2003 9:38 am
learn tcl-command.doc
Code: Select all
set channel "#mychan"
foreach thisban [banlist $channel] {
set banhost [lindex $thisban 0]
killchanban $channel $banhost
}
But I'm not sure of the killchanban syntax (argument used???) and I've no time to spend to test it
MINImi
Voice
Posts: 30 Joined: Sat Oct 11, 2003 6:52 am
Post
by MINImi » Wed Oct 15, 2003 11:24 am
there must be scripts for
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Wed Oct 15, 2003 11:31 am
MINImi wrote: there must be scripts for
And by reading docs/tcl-commands.doc and
http://www.suninet.nl plus the information already given you should be able to make it yourself.
CrazyCat
Revered One
Posts: 1304 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Wed Oct 15, 2003 1:11 pm
Hey master
can't you say if my syntax was good or, if no, wich is the good?
I think that killchanban prefers the id of ban, not the host.
If yes, how to get the ID ?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Oct 16, 2003 8:46 am
i see that the syntax is correct.
Code: Select all
bind pub mo|mo !unbanall unban:all
proc unban:all {nick uhost hand chan arg} {
foreach thisban [banlist $chan] {
set banhost [lindex $thisban 0]
killchanban $channel $banhost
}
}
Tested, works fine.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Thu Oct 16, 2003 1:11 pm
Probably you mean
killchanban $chan $banhost not $channel
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Oct 16, 2003 4:08 pm
yeah :p I copied it from crazycat and forgot to change it to $chan
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Oct 17, 2003 12:59 am
And how did it worked fine if you had $channel instead of $chan?
Once the game is over, the king and the pawn go back in the same box.
Jag
Halfop
Posts: 90 Joined: Fri Sep 19, 2003 10:06 am
Post
by Jag » Fri Oct 17, 2003 7:24 am
didn't work
Code: Select all
bind pub - !unbanall unban:all
proc unban:all {nick uhost hand chan arg} {
foreach thisban [banlist $chan] {
set banhost [lindex $thisban 0]
killchanban $chan $banhost
}
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Oct 17, 2003 8:37 am
i added some bans into #channel and in partyline:
.tcl foreach thisban [banlist #channel] { set banhost [lindex $thisban 0] ; killchanban #channel $banhost }
the bot removed all bans from the channel.
if it didn't work for you, then the ban is probably a global ban not a channel specific ban.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Oct 17, 2003 1:10 pm
Doh! It's impossible not to work with #channel in bouth places as in
[banlist #channel] and in
killchanban #channel .. Test this and tell me if it's working:
Code: Select all
.tcl set $chan #channel ; foreach thisban [banlist $chan] { set banhost [lindex $thisban 0] ; killchanban $channel $banhost }
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Oct 17, 2003 5:23 pm
dude caesar! you're talking about something completely different from the issue, okay i tested the correct code, but pasted a wrong code used $channel instead of $chan (oh God please forgive me), comeon let it go.
also Jag used the correct code, and it should work.