mIRC Home    About    Download    Register    News    Help

Print Thread
#173328 23/03/07 09:15 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Code:
ON 1:TEXT:*een fiets*:#testing:{
  if $nick == Angelic || $nick isop $chan || $nick ishop $chan {
    .halt
  }
  Else {
    msg $chan $nick Can't you read the topic? Do not ask for een fiets or msn in here or you will get kicked from this channel!
  }
}


How can i change it to:

<CDuck> somebody has "een fiets"?
<Duck_Power> CDuck Can't you read the topic? Do not ask for een fiets or msn in here or you will get kicked from this channel!
- 2 minutes later.
<CDuck> somebody has "een fiets"?
* Kicks: CDuck (DuCkY@Dunno.What.it.means.org) was kicked by Duck_Power: (You was warned to DONT ask for een fiets!)
- 4 minutes later.
Joins: CDuck (DuCkY@Dunno.What.it.means.org) has joined #Testing
<CDuck> somebody has "een fiets"?
* Bans: Duck_Power (DuCkY@O.-.Duck.Power.-.O) sets mode +b *!*@Dunno.What.it.means.org
* kicks: CDuck (DuCkY@Dunno.What.it.means.org) was kicked by Duck_Power: (You were warned and kicked, this is your ban, enjoy it!)

It needs to warn the first time.
It needs to kick the 2th time.
it needs to ban the 3th time.



Squee whenever a squee squee's. Squee whenever a squee does not squee.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can use this. Note that it is set to allow a person to ask once per hour without getting kicked/banned... you can increase this (3600 seconds = 1 hour) to a larger number or remove the -u3600 altogether so that they are never reset. However, if you have a lot of people getting in trouble for this, your variable file will get rather large if you don't unset them once in awhile. Note that 86400 is one day, if you want to do it by day. It's up to you.

Code:
on *:text:*een fiets*:#testing:{
  if ($nick == Angelic || $nick isop $chan || $nick ishop $chan) { return }
  var %info = $($+(%,eenfiets.,$nick),2)
  if (%info == $null) {
    set -u3600 %eenfiets. $+ $nick 1
    msg $chan $nick Can't you read the topic? Do not ask for een fiets or msn in here or you will get kicked from this channel!
  }
  elseif (%info == 1) {
    set -u3600 %eenfiets. $+ $nick 2
    kick $chan $nick You were warned to NOT ask for een fiets!
  }
  elseif (%info == 2) {
    ban -ku3600 $chan $nick You were warned and kicked, this is your ban, enjoy it!
  }
}


Basically, if someone says that, they are warned the first time. If they say it again in 3600 seconds (1 hour), they are kicked and the 3600 timer resets. If the person says it again before that hour is up, then the person is kicked/banned for an hour (the -u3600 on the ban is the timer before automatically unsetting it... you can change or remove that if you want to).

Another example... if a person says that, they are warned the first time. If they wait to say it again until more than an hour later, they will just be warned instead of kicked. If they then said it again in that hour, they would get kicked, then banned if they said it again within the new hour.

If that doesn't make sense, let me know.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
ty


Squee whenever a squee squee's. Squee whenever a squee does not squee.

Link Copied to Clipboard