Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!
by SilverRain » Sun Apr 27, 2008 8:59 am
- Code: Select all
alias dynamicbans {
if ($exists(dbans.hsh)) !hmake dbans 1000 | !hload dbans dbans.hsh
var %chan = $iif($1,$1,$active)
if ($me !isop %chan) { echo /dynamicbans :Insufficient Priviledges | halt }
if ($ibl(%chan,0) = 0) { echo No bans found on %chan | halt }
var %x = 1
while (%x <= $ibl(%chan,0)) {
var %q = $ibl(%chan,%x)
hadd -m dbans $chan %q $ibl(%chan,%x).by
inc %x
}
mode $chan +b-b *!*@* *!*@*
!hsave dbans dbans.hsh
}
on !@*:JOIN:#: {
if ($hget(dbans,$chan)) {
var %x = 1
while (%x <= $hget(dbans,$chan,0).item) {
var %q = $hget(dbans,$chan,%x)
if (%q iswm $address($nick,5)) {
ban -k $chan $nick 1 You are BANNED from this channel by: $hget(dbans,$chan,%q)
}
inc %x
}
}
}
on *:START:{ !hmake dbans 1000 | !hload dbans.hsh }
on *:EXIT:{ !hsave dbans dbans.hsh }
Syntax: /dynamicbans <#channel>
You must be opped on the channel && if channel is left blank, the active channel is used.
-
SilverRain
-
by Cristian » Tue Apr 29, 2008 6:36 pm
nice script
-
Cristian
- proof of advance

-
- Posts: 282
- Joined: Sun Nov 04, 2007 3:02 pm
- Location: Denmark
- Authnick: Sumsar
-
by Lukemob » Tue May 27, 2008 2:32 pm
Well man, many don't know what the eggdrop is, and also many don't know, what the scripting is. When a newbie see " Dynamic bans ", he would wonder what's that script about. You should also explain how it works...
Anyway, GJ
-
Lukemob
-
by Futz0r » Mon Jul 13, 2009 4:46 am
i get something error *_*
i have written /dynamicbans #futz0r.dk
- Code: Select all
* /hload: unable to open file 'C:\Users\Futz0r\Desktop\m00irc-v21\m00irc\dbans.hsh' (line 2, script6.mrc)
get a other error after restart a mirc
- Code: Select all
* /hmake: table 'dbans' exists (line 2, script6.mrc)
-
Futz0r
-
by zNigel- » Sun Jul 19, 2009 11:29 pm
Futz0r wrote:i get something error *_*
i have written /dynamicbans #futz0r.dk
- Code: Select all
* /hload: unable to open file 'C:\Users\Futz0r\Desktop\m00irc-v21\m00irc\dbans.hsh' (line 2, script6.mrc)
get a other error after restart a mirc
- Code: Select all
* /hmake: table 'dbans' exists (line 2, script6.mrc)
my guess is, it should be "if (!$exists(dbans.hsh)) !hmake dbans 1000 | !hload dbans dbans.hsh"
Never used hashtables so i have no idea ;x
-
zNigel-
-
by Blady » Thu Jul 23, 2009 2:15 pm
I think there is a mistake in your script
- Code: Select all
on !@*:JOIN:#: {
if ($hget(dbans,$chan)) {
var %x = 1
while (%x <= $hget(dbans,$chan,0).item) {
var %q = $hget(dbans,$chan,%x)
if (%q iswm $address($nick,5)) {
ban -k $chan $nick 1 You are BANNED from this channel by: $hget(dbans,$chan,%q)
}
inc %x
}
You did not check if your ibl is updated (You don't KNOW the banlist of a channel when you join it (Stop me if i'm wrong))
-
Blady
-
by Blady » Mon Aug 17, 2009 3:22 pm
zNigel wrote:my guess is, it should be "if (!$exists(dbans.hsh)) !hmake dbans 1000 | !hload dbans dbans.hsh"
Never used hashtables so i have no idea ;x
That's not a hashtable related problem, but a boolean-condition problem

And you're right, its
!$exists(...)
-
Blady
-
by zNigel- » Mon Aug 17, 2009 3:30 pm
Blady wrote:zNigel wrote:my guess is, it should be "if (!$exists(dbans.hsh)) !hmake dbans 1000 | !hload dbans dbans.hsh"
Never used hashtables so i have no idea ;x
That's not a hashtable related problem, but a boolean-condition problem

And you're right, its
!$exists(...)
Ah nice. Btw, really good to have you back

-
zNigel-
-
by Blady » Tue Aug 18, 2009 7:21 am
zNigel wrote:Blady wrote:zNigel wrote:my guess is, it should be "if (!$exists(dbans.hsh)) !hmake dbans 1000 | !hload dbans dbans.hsh"
Never used hashtables so i have no idea ;x
That's not a hashtable related problem, but a boolean-condition problem

And you're right, its
!$exists(...)
Ah nice. Btw, really good to have you back

I'm sad @ work, can't use IRC, so this is a good way to keep a link with it ;] (Even if I don't really like the theme of this forum :/)
-
Blady
-
by StareX » Thu Sep 24, 2009 10:02 am
What that script does?

explain what can i do with that or... something? o.O
-
StareX
-
Return to Mirc Scripting Release
Who is online
Users browsing this forum: No registered users and 0 guests