Ban List

Platform:  mIRC
Published  Apr 05, 2010
Updated  Apr 20, 2010

Screenshots

A simple mIRC Script for displaying a list of banned hostnames on a channel


Commands:

Bot: !banlist (channel)

User: /banlist (channel)

Screenshot shows output. Hostnames blacked out for obvious reasons.


NOTE: This can only retrieve ban's from channel's you/the bot is in, I cannot fix this. USER SCRIPT
----------------------------

alias banlist {
if ($ibl($1,1) == $null) {
msg $chan There is no bans in the channel $1 $+ .
halt
}
else {
msg $chan The following bans are in place in the channel $1 $+ :
var %banlist = 0
:banlist
if (%banlist == $ibl($1,0)) {
halt
}
else {
inc %banlist
msg $chan %banlist $+ . $ibl($1,%banlist)
goto banlist
}
}
}






BOT SCRIPT
----------------------------

on *:TEXT:!banlist *:#: {
if ($ibl($2,1) == $null) {
msg $chan There is no bans in the channel $2 $+ .
halt
}
else {
msg $chan The following bans are in place in the channel $2 $+ :
var %banlist = 0
:banlist
if (%banlist == $ibl($2,0)) {
halt
}
else {
inc %banlist
msg $chan %banlist $+ . $ibl($2,%banlist)
goto banlist
}
}
}

Comments

Sign in to comment.
Jethro   -  Apr 24, 2010
There's no timed delay in the message output, especially for a channel that has lots of bans... Some servers will ban you for flooding. Looking at the code closely, you really don't need the goto command for this.
 Respond  
darkly57   -  Apr 24, 2010
D: How? lol
 Respond  
falconr3   -  Apr 24, 2010
You big idiot! You almost caused me a ban!
1/10
 Respond  
darkly57   -  Apr 21, 2010
Because, at least on mine, $ibl only works if your in the channel, So say I was in #test and #test2, but I wanted to get the banlist from #test3, any way to do that?
 Respond  
Jethro   -  Apr 21, 2010
How do you mean?
 Respond  
darkly57   -  Apr 21, 2010
Hmm.

I don't really get what around saying. I'm not familiar with the /auser and /guser commands.

But I'm sure you're probably right :P

Do you by any chance know how to make this work if the person is not actually IN the specified channel?
 Respond  
Jethro   -  Apr 20, 2010
Excluding the alias, Let's say if you had 10 users in your channel who had this script loaded together, what would happen then? The best approach to this is using user list to allow certain people for the access: on allowed:text:!banlist:#: {with the use of /auser or /guser command.
 Respond  
darkly57   -  Apr 20, 2010
Yes, That would work. But then if a user was to use this code, and someone typed !banlist (channel), It would bring it up.

It would be easy just to exclude the first line, but if you don't know scripting they wouldn't know to do that.

So overall, That would be more simple, But also has flaws.
 Respond  
Jethro   -  Apr 06, 2010
You really don't need to split this script in alias and text event. Just simply combine them like so:
Code
 
Now you can have one script for two uses.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.