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.

Clear bans

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
D
DaRkOoO
Halfop
Posts: 67
Joined: Sat Sep 27, 2008 7:27 am

Clear bans

Post by DaRkOoO »

Hi,

I need script which will make my bot to remove all active bans on channel when I say !cbans,and other script which will remove just last ban on channell when I say !rlastban ;)


Regards,
Darko.
D
DaRkOoO
Halfop
Posts: 67
Joined: Sat Sep 27, 2008 7:27 am

Post by DaRkOoO »

sooo,is someone going to help me?I think this should be simple ;/
W
Way2Death
Voice
Posts: 15
Joined: Tue Mar 31, 2009 3:30 pm

Post by Way2Death »

This depends on which network you're on. If you can provide me the code to unban some one at your network i can provide you the code
D
DaRkOoO
Halfop
Posts: 67
Joined: Sat Sep 27, 2008 7:27 am

Post by DaRkOoO »

/cs unban nick/host or
/msg chanserv unban nikc/host
But I wanted to my bot delete bans by his own,not using chanserv..:)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Something like this should do the trick:

Code: Select all

bind pub n|n "!cbans" pubCBans
bind pub n|n "!rlastban" pubRLastBan

proc pubCBans {nick host handle channel text} {
 foreach ban [chanbans $channel] {
  pushmode $channel -b [lindex $ban 0]
 }
}

proc pubRLastBan {nick host handle channel text} {
 set bans [lsort -index 2 -integer -decreasing [chanbans $channel]
 pushmode $channel -b [lindex $bans 0 0]
}
NML_375
D
DaRkOoO
Halfop
Posts: 67
Joined: Sat Sep 27, 2008 7:27 am

Post by DaRkOoO »

Works fine,thanks :D
Post Reply