mIRC Home    About    Download    Register    News    Help

Print Thread
#157996 30/08/06 11:28 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
All the ban I set in the channel is auto added to my sticky banlist. Can anyone see why this happens?

;$hget($+(stickybansettings,$the.network,$chan),whatever)

menu channel {
-
Sticky Ban Settings ( $+ $iif($config(stickybanswitch),$v1,Off) $+ )
.Turn $iif($config(stickybanswitch),Off,On) smirk $iif($config(stickybanswitch),hashremove $+(stickybansettings,$the.network,$chan) stickybanswitch,storehash $+(stickybansettings,$the.network,$chan) stickybanswitch On)
..-
..List:{ var %a $hget(stickybans,0).item | while %a { echo -a %a $hget(stickybans,%a).item in $gettok($hget(stickybans,%a).data,1,32) on $gettok($hget(stickybans,%a).data,2,32) | dec %a } }
..Add:{ var %a $?="Enter ban" | echo -a added $! to your ban list | hadd -m stickybans $! $chan $the.network | mode $chan +b %a }
..Remove:{ var %a $?="Enter ban to remove" | if ($hget(stickybans,%a)) { hdel stickybans $! | echo -a You have removed $! from your Sticky Ban list. } | else { echo -a $! was Not In The StickyBan List. } }
..Clear List:{ if $hget(sickybans) { hfree stickybans | echo -a Sticky Ban list has been cleared. } | else { echo -a There Currently is No StickyBan List. } }
}
on *:rawmode:#: {
if $config(stickybanswitch) {
var %q = 1
var %r = 1
while $mid($1,%q,1) {
var %x = $ifmatch
if (%x isin +-) { var %s = $ifmatch }
if (%x isincs eIbvho) {
if ($mode(%r)) {
if (b == %x) {
if (%s == +) {
if ($nick == $me) {
; echo -a $mode(%r)
if ($hget(stickybans,$mode(%r))) && ($gettok($hget(stickybans,$mode(%r)),1,32) == $chan) && ($gettok($hget(stickybans,$mode(%r)),2,32) == $the.network) { break }
if (($mode(%r) iswm $address($me,5)) || ($mode(%r) iswm $reptok($address($me,5),$host,$ip,64))) { break }
else {
if (!$config(stickybanam)) { hadd -m stickybans $mode(%r) $chan $the.network | echo -a  $+ $colour(other) $+ $timestamp Added $mode(%r) to your Sticky Ban List in $chan on $the.network $+ ! }
}
if (($mode(%r) iswm $address($me,5)) || ($mode(%r) iswm $reptok($address($me,5),$host,$ip,64))) && ($nick != $me) { cs unban # $me | cs INVITE # | notice $nick Don't ban me! }
}
}
if (%s == -) {
if ($hget(stickybans,$mode(%r))) && ($gettok($hget(stickybans,$mode(%r)),1,32) == $chan) && ($gettok($hget(stickybans,$mode(%r)),2,32) == $the.network) {
if ($nick == $me) {
if ($hget(stickybans,$mode(%r)).item) && (!$config(stickybanam)) { hdel stickybans $mode(%r) | echo -a  $+ $colour(other) $+ $timestamp Removed $mode(%r) from your Sticky Ban List in $chan on $the.network $+ ! }
}
else {
;if ($nick != chanserv) {
if ($me isop $chan) {
; echo -a $mode(%r)
echo -a  $+ $colour(other) $+ $timestamp $nick Removed your sticky ban.
; if (!$hget(stickyundone,$+($the.network,$chan,$mode(%r)))) { .mode $chan +b $mode(%r) | .timer $+ $the.network $+ $chan $+ $Mode(%r) 1 120 .mode $chan -b $mode(%r) }
;else { hadd -mu600 stickyundone $+($the.network,$chan,$mode(%r)) 1 }
if (!$hget(stickyundoer,$+($the.network,$chan,$nick))) {
hadd -mu600 stickyundoer $+($the.network,$chan,$nick) 1
hadd -m $+($the.network,$chan,sbmodes) %q $mode(%r) +b
.timer $+ $+($the.network,$chan,sbmodes) 1 2 sbmodes $the.network $chan

}
}
else {
hadd -m reban $mode(%r) $chan $the.network
if ($me isvoice $chan)
}
}
}
}
}
if (%x isin o) {
if ($mode(%r) == $me) {
;echo -a %s opin $mode(%r) $chan $the.network
if (%s == -) {
;echo -a deopin you
}
if (%s == +) {
;akick
if ($hget(stickybans,0).item) {
var %b = $hget(stickybans,0).item
while %b {
if ($gettok($hget(stickybans,%b).data,1,32) == $chan) {
if ($gettok($hget(stickybans,%b).data,2,32) == $the.network) {
hadd -m $+($1,$2,sbmodes) %q $hget(stickybans,%b).item +b
}
}
dec %b
}
.timer $+ $+($1,$2,sbmodes) 1 2 sbmodes $the.network $chan
}
}
}
}

}
inc %r
}
inc %q
}
if ($hget(stickybans)) { hsave -i stickybans stickybans.txt }
}
}

alias sbmodes {
var %a = $hget($+($1,$2,sbmodes),0).item
while %a {
var %b = %b $gettok($hget($+($1,$2,sbmodes),%a).data,1,32)
var %c = %c $+ $gettok($hget($+($1,$2,sbmodes),%a).data,2,32)
if ($numtok(%b,32) >= $modespl) { mode $2 %c %b | unset %c | unset %b }
dec %a
}
if (%b) { mode $2 %c %b | unset %c | unset %b }
if ($hget($+($1,$2,sbmodes))) { hfree $+($1,$2,sbmodes)) }
}


alias config {
if $hget($+(stickybansettings,$the.network,$chan),$1).data { return $hget($+(stickybansettings,$the.network,$chan),$1) }
else { return }
}

alias -l the.network return $iif($network,$v1,$gettok($server,$calc($numtok($server,46) - 1),46))

alias -l storehash {
hadd -m $1 $2 $3-
hsave -i $1 $sdat $1
}

alias -l hashremove {
;table item
hdel $1 $2
if $hget($1,0).item { hsave -i $1 $sdat $1 }
if !$hget($1,0).item {
remini -n $sdat $1
hfree $1
}
}

on *:start:{ hashscript }

alias -l sdat return $+(",$scriptdirLinuxx.dat,")

alias -l hashscript {
var %a = $ini($sdat,0)
while %a {
if (($ini($sdat,%a) != default) || ($ini($sdat,%a) != Linuxx)) {
if $hget($ini($sdat,%a)) { hfree $ini($sdat,%a) }
hmake $ini($sdat,%a)
hload -i $ini($sdat,%a) $sdat $ini($sdat,%a)
}
dec %a
}
}

#157997 02/09/06 04:55 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
If this code cant be fix. Can anyone make a more simple one?

#157998 02/09/06 08:17 PM
Joined: Apr 2005
Posts: 9
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Apr 2005
Posts: 9
It's very difficult to analyze somebody else's code, especially when it's huge and doesn't have any comment on how it is supposed to work or what the error is.

#157999 02/09/06 11:19 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
The problem I am having is that all the bans I set in the channel are all added to the sticky ban list.

#158000 04/09/06 09:27 PM
Joined: Sep 2006
Posts: 3
S
Self-satisified door
Offline
Self-satisified door
S
Joined: Sep 2006
Posts: 3
on *:join:#:{
if ($level($nick) == 5) { /kick $chan $nick Get out !!! }
if ($level($nick) == 6) { /ban $chan $nick 2 | /kick # $nick you are baned forever !!! } }
if ($level($nick) == 7) { /ban $chan $nick 2 | /kick # $nick you are not allowed in this chanel ! } }
is something like that work for you
its nice and small
just add the nick you want in user tab whit the number you want and you will be ok

#158001 05/09/06 09:08 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
smpleuser your code does not work :P
And I dont want kick msg just reban :P


Link Copied to Clipboard