mIRC Home    About    Download    Register    News    Help

Print Thread
On Ban #170079 02/02/07 07:10 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Somebody knows what's wrong is with this?

Code:
 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):



Php Code:
 Ulanta was banned by Axeserv with the reason : No date chat!  




Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170087 02/02/07 09:54 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
$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.


Invision Support
#Invision on irc.irchighway.net
Re: On Ban [Re: DuXxXieJ] #170094 03/02/07 02:17 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
$banmask is the address banned - dont forget that one smile


Those who fail history are doomed to repeat it
Re: On Ban [Re: landonsandor] #170096 03/02/07 04:07 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
True, but the example didn't show any need for that. smile


Invision Support
#Invision on irc.irchighway.net
Re: On Ban [Re: Riamus2] #170099 03/02/07 07:53 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
true that, but considering the original coding was wrong, I figured I'd offer that up since it is related to the event smile


Those who fail history are doomed to repeat it
Re: On Ban [Re: landonsandor] #170105 03/02/07 10:57 AM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Aha, so you guys mean this? :

Code:
 On *:BAN:#:{
write bans.txt $bnick ( $banmask ) was banned by $nick with the reason : $+ $4 $+
}


??

But that $+ $4 $+ is good? ;o


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170106 03/02/07 10:59 AM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
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


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170110 03/02/07 12:31 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
I think i know now what the reason is :

Code:
 $chr(40) $+ $1- $+ ! $+ $chr(41)


but the $bnick still doesnt work


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170111 03/02/07 12:37 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
No that doesn't work.

It shows :

with the reason (+b <address)

frown


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170114 03/02/07 01:38 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As I stated, you do NOT have a reason on a ban. Only on kicks.


Invision Support
#Invision on irc.irchighway.net
Re: On Ban [Re: Riamus2] #170118 03/02/07 01:44 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
I know, but it's for my bot, and i just like it

xD


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170119 03/02/07 01:44 PM
Joined: Jan 2007
Posts: 280
DuXxXieJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Cause if peoples are gonna ask why they are banned, i can show it!


Squee whenever a squee squee's. Squee whenever a squee does not squee.
Re: On Ban [Re: DuXxXieJ] #170120 03/02/07 02:39 PM
Joined: Dec 2002
Posts: 2,024
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,024
$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.
Re: On Ban [Re: DuXxXieJ] #170151 03/02/07 08:26 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: On Ban [Re: RoCk] #170815 15/02/07 01:35 AM
Joined: Feb 2007
Posts: 4
B
blues Offline
Self-satisified door
Offline
Self-satisified door
B
Joined: Feb 2007
Posts: 4
Originally Posted By: RoCk

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.
Re: On Ban [Re: blues] #170820 15/02/07 09:41 AM
Joined: Nov 2005
Posts: 105
D
drc4 Offline
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
adding the date is as easy as adding either $date or $fulldate into the line that you're writing. For example you could change
Quote:
write kbans.txt $nick banned $banmask $iif($bnick,$+($chr(40),$bnick,$chr(41))) on #
to
Quote:
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.
Re: On Ban [Re: drc4] #170956 17/02/07 05:24 AM
Joined: Feb 2007
Posts: 4
B
blues Offline
Self-satisified door
Offline
Self-satisified door
B
Joined: Feb 2007
Posts: 4
Thanks much, drc4 smile