|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
Somebody knows what's wrong is with this? On *:BAN:#:{
write bans.txt $nick was banned by $$1- with the reason : $+ $4 $+
}
It needs to write a txt in my mIRC map and needs to write (like this): Ulanta was banned by Axeserv with the reason : No date chat!
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
$nick = Person who did the banning $bnick = Person who was banned
Bans have no reasons. Only kicks do. And I don't know why you have a $+ at the end of the line as it will not do anything like that.
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
$banmask is the address banned - dont forget that one 
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
True, but the example didn't show any need for that. 
|
|
|
|
Joined: Dec 2002
Posts: 1,536
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,536 |
true that, but considering the original coding was wrong, I figured I'd offer that up since it is related to the event 
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
Aha, so you guys mean this? : On *:BAN:#:{
write bans.txt $bnick ( $banmask ) was banned by $nick with the reason : $+ $4 $+
}
?? But that $+ $4 $+ is good? ;o
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
erm.. it works but i get :
( *!*@axe-6B2E39AA.retail.telecomitalia.it ) was banned by Gamingbot with the reason : ( *!*@axe-E015E75A.adsl.alicedsl.de ) was banned by Boyy_18__ with the reason : ( *!*@axe-69A4ED39.cable.quicknet.nl ) was banned by Duck_Power with the reason :
it doesnt say the reason, and the $bnick
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
I think i know now what the reason is : $chr(40) $+ $1- $+ ! $+ $chr(41)
but the $bnick still doesnt work
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
No that doesn't work. It shows : with the reason (+b <address) 
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
As I stated, you do NOT have a reason on a ban. Only on kicks.
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
I know, but it's for my bot, and i just like it
xD
|
|
|
|
Joined: Jan 2007
Posts: 280
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2007
Posts: 280 |
Cause if peoples are gonna ask why they are banned, i can show it!
|
|
|
|
Joined: Dec 2002
Posts: 1,995
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,995 |
$bnick is only filled if the nick is in the ban mask, otherwise $bnick is $null.
* Robert sets mode: +b [color:red]Nick!*@axe-6B2E39AA.retail.telecomitalia.it[/color]
on *:BAN:#: { write bans.txt $bnick ( $banmask ) was banned by $nick }
In this case, $bnick = Nick & $nick = Robert
You'd be better off logging bans & kicks...
on *:BAN:#: { write kbans.txt $nick banned $banmask $iif($bnick,$+($chr(40),$bnick,$chr(41))) on # }
on *:KICK:#: { write kbans.txt $knick as kicked from # by $nick $iif($1 != $null,with the reason: $1-) }
Last edited by RoCk; 03/02/07 02:46 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
As RoCk said, you need to get the reason from the kick event. Just because you want to get a reason from the ban doesn't mean you can. When you ban someone, you do not give a reason. Only the kick has a reason.
|
|
|
|
Joined: Feb 2007
Posts: 2
Self-satisified door
|
Self-satisified door
Joined: Feb 2007
Posts: 2 |
You'd be better off logging bans & kicks...
on *:BAN:#: { write kbans.txt $nick banned $banmask $iif($bnick,$+($chr(40),$bnick,$chr(41))) on # }
on *:KICK:#: { write kbans.txt $knick as kicked from # by $nick $iif($1 != $null,with the reason: $1-) }
Nice script. Is there a way to have it also record the date in that log?
Last edited by blues; 15/02/07 01:35 AM.
|
|
|
|
Joined: Nov 2005
Posts: 104
Vogon poet
|
Vogon poet
Joined: Nov 2005
Posts: 104 |
adding the date is as easy as adding either $date or $fulldate into the line that you're writing. For example you could change write kbans.txt $nick banned $banmask $iif($bnick,$+($chr(40),$bnick,$chr(41))) on # to write kbans.txt $nick banned $banmask $iif($bnick,$+($chr(40),$bnick,$chr(41))) on # (Date: $fulldate $+ )
Last edited by drc4; 15/02/07 09:44 AM.
|
|
|
|
Joined: Feb 2007
Posts: 2
Self-satisified door
|
Self-satisified door
Joined: Feb 2007
Posts: 2 |
Thanks much, drc4 
|
|
|
|
|