mIRC Home    About    Download    Register    News    Help

Print Thread
#129008 01/09/05 01:05 AM
S
ShAlkE
ShAlkE
S
i have made this script to ban ppl if they use a ban word.. but i want the script to unban that person after 15 min ? how do i do this?
i time ban i need!!


on 1*:TEXT:#*:#: { if ($nick isreg $chan) { /ban #total90 $nick 1 | /kick #total90 $nick Advertising, bye! } }

#129009 01/09/05 01:19 AM
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
Quote:
on 1*:TEXT:#*:#: { if ($nick isreg $chan) { /ban #total90 $nick 1 | /kick #total90 $nick Advertising, bye! } }


There's no point specifying '1' if you're going to specify '*' as the access level. Also note, you do not need to include the / command prefix in a script. And finally, you can use the -k switch with the /ban command to save making separate /ban and /kick commands.

To unban an address after a set time, use the -u switch with the /ban command. For example, /ban -ku300 # $nick 3 Advertising would kick and ban a *!*user@*.domain for 'Advertising', and unban them automatically after 300 seconds (5 minutes). The time must be specified in seconds.

Also see:
/help on text
/help /ban


Regards,

#129010 01/09/05 01:22 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Code:
On @*:Text:*:#total90: {
  if ($wildtok($1-,#?*,0,32)) ban -ku900 $nick 1 Advertising, bye!
}


-Andy

#129011 01/09/05 08:42 AM
S
ShAlkE
ShAlkE
S
thx

#129012 01/09/05 11:57 AM
S
ShAlkE
ShAlkE
S
one more problem :///
i dont want to kick ops or voiced users

pLS

#129013 01/09/05 06:20 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Building from Andy's code:

Code:
On @*:Text:*:#total90: {
  if ($wildtok($1-,#?*,0,32) && $nick isreg $chan) ban -ku900 $nick 1 Advertising, bye!
}

#129014 02/09/05 02:58 PM
S
ShAlkE
ShAlkE
S
what is this?

* /ban: invalid parameters (line 2, anti2.mrc)

#129015 02/09/05 03:03 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Shouldn't be an issue, but try inserting $chan before $nick in the ban statement.

#129016 02/09/05 07:50 PM
S
ShAlkE
ShAlkE
S
Riamus2 i did what you sayed, but didn`t work smirk

confused confused
* /ban: invalid parameters (line 2, anti2.mrc)

how do i fix this?

#129017 02/09/05 08:00 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Try typing in the channel where you're opped (replace NICK with a valid nick):

/ban -ku900 NICK 1 Advertising, bye!

If that gives an error, try:

/ban -ku900 NICK 1

#129018 02/09/05 08:03 PM
S
ShAlkE
ShAlkE
S
they work smirk no error
but the script gives the error

#129019 02/09/05 08:32 PM
S
ShAlkE
ShAlkE
S
heeeeeeeeelp

#129020 02/09/05 08:35 PM
S
spleenie
spleenie
S
You should be using
Code:
ban -ku900 # $nick 1 kickmsg

#129021 02/09/05 08:36 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Try:

Code:
On @*:Text:*:#total90: {  
  if ($wildtok($1-,#?*,0,32) && $nick isreg $chan) ban -ku900 $chan $nick 1 Advertising, bye!
}


-Andy

#129022 02/09/05 08:37 PM
S
ShAlkE
ShAlkE
S
thxxxxxxxx :*

#129023 02/09/05 08:46 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Hm... I thought I suggested that... "put $chan in front of $nick" .... oh well.

#129024 02/09/05 08:58 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
You mean before dude, and you did mention it. Maybe they didn't know what you mean, some people like to be shown the way fully. Should they have looked at the syntax of /ban in the help file then they'd have got it no problem at all.. smile

-Andy


Link Copied to Clipboard