mIRC Home    About    Download    Register    News    Help

Print Thread
1day/week ban #144074 05/03/06 02:03 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Hi, i've been trying to create a 1day & 1week ban. But i think i've got some problems with the timer.

This is what i've got:
Code:
 
on admin:TEXT:.1day-ban*:#: {
  mode # +b $address($2-,1)
  kick # $2-  Banned for 1 day 
  timer 0 86400 mode # -b $address($2-,1)
}
on admin:TEXT:.1week-ban*:#: {
  mode # +b $address($2-,1)
  kick # $2-  Banned for 1 week 
  timer 0 604800 mode # -b $address($2-,1)
}

I figured out the seconds for 1 day & 1 week, But there's something wrong, cuz my bot already unbans the user after a second (3seconds...) ...


If you mess with the best, u will die like the rest !
Re: 1day/week ban #144075 05/03/06 02:10 PM
Joined: Feb 2006
Posts: 54
T
tso29 Offline
Babel fish
Offline
Babel fish
T
Joined: Feb 2006
Posts: 54
why you not just do it the way below:
Code:
;1 week
/ban -u604800 # someaddress
;1 day
/ban -u86400 # somaddress

Re: 1day/week ban #144076 05/03/06 02:19 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
and by using the k switch with the /ban command, as suggested by TSO29, you also don't need the kick command

Re: 1day/week ban #144077 05/03/06 02:23 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
I don't know, hmm... It's for some big channels & the bot has to unban the (same) address after 1day or week, ... Well, actually it aint using timers now? So, it's not needed to stop a timer... Well, this is what i've got now:
Code:
on admin:TEXT:.1day-ban*:#: {
  mode # +b $address($2-,1)
  kick # $2-  Banned for 1 day 
  ban -u86400 # $address($2-,1)
}
on admin:TEXT:.1week-ban*:#: {
  mode # +b $address($2-,1)
  kick # $2-  Banned for 1 week 
  ban -u604800 mode # $address($2-,1)
}


If you mess with the best, u will die like the rest !
Re: 1day/week ban #144078 05/03/06 02:33 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
combining what you have, with the suggestions would get you the following
Code:
 on admin:TEXT:.1day-ban*:#: {
ban -ku86400 $chan $nick 2   Banned for 1 day  
}
on admin:TEXT:.1week-ban*:#: {
ban -ku604800 $chan $nick 2   Banned for 1 week 
} 

Last edited by RusselB; 05/03/06 04:07 PM.
Re: 1day/week ban #144079 05/03/06 02:45 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Ok, the ban works fine... But the user stays in the channel.
Well, i'm not going mess with the code now, could u create it that it also kicks the user? Cuz that script doesn't kick the user's nick... It's trying to kick the "address" but u can't kick an address...
(*!*fish@go.moo.oh.yes.they.do is not online!)
That's why my bot tried to kick, but u can only kick $nick's & no $address's ...
Code:
on admin:TEXT:.1day-ban*:#: {
  ban -ku86400 $chan $address($2,1)   Banned for 1 day 
}
on admin:TEXT:.1week-ban*:#: {
  ban -ku604800 $chan $address($2,1)   Banned for 1 week 
} 

This is what i putted in my remotes... & it does unban the host after 1day or week, right? ... (kick aint working)


If you mess with the best, u will die like the rest !
Re: 1day/week ban #144080 05/03/06 02:55 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Isn't it the best thing that i'll leave the "kick" part alone? smile not in the same sentence with the ban?


If you mess with the best, u will die like the rest !
Re: 1day/week ban #144081 05/03/06 04:08 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
sorry..Try my edited code. It should kick the nick, then ban the address using the 2nd host mask.

Re: 1day/week ban #144082 05/03/06 04:50 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Ok, now it's totally messed up i think smile Check this:

<eo`PhyX> .1day-ban fishbot
* ^Miss-Kitty^ sets mode: +b *!*@Phyxius.users.quakenet.org
* eo`PhyX was kicked by ^Miss-Kitty^ ( Banned for 1 day )
(now the bot is banning the guy who says the command... (me) ... )
This is what i've got now:
Code:
on admin:TEXT:.1day-ban*:#: {
  ban -ku86400 $chan $nick 2   Banned for 1 day  
}
on admin:TEXT:.1week-ban*:#: {
  ban -ku604800 $chan $nick 2   Banned for 1 week 
} 

Hmm... someone can fix this problem? shocked


If you mess with the best, u will die like the rest !
Re: 1day/week ban #144083 05/03/06 05:04 PM
Joined: Feb 2006
Posts: 54
T
tso29 Offline
Babel fish
Offline
Babel fish
T
Joined: Feb 2006
Posts: 54
on admin:TEXT:.1day-ban*:#: {
i sugguest the command is (.1day-ban nickname)
if it is so! $nick is the one who typed the command and ($2)
is the one thet sould be punished
Code:
  
on admin:TEXT:.1day-ban*:#: {
 ban -ku86400 $chan $2 2   Banned for 1 day reguested by $nick  
}

Re: 1day/week ban #144084 05/03/06 06:27 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Ok, that works wink

Thank u guys 4 all the help cool


If you mess with the best, u will die like the rest !