mIRC Home    About    Download    Register    News    Help

Print Thread
#177853 01/06/07 05:47 AM
Joined: May 2007
Posts: 7
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: May 2007
Posts: 7
This code kline not working
Code:
 on *@:text:*:#:{
  var %n = $nick,%c = #,%t = $strip($1-)
  if (*www.?.com iswm %t) || (*http://* iswm %t) || (*www.?.org* iswm %t) || (*www.?.net* iswm %t) || (www?.co.uk* iswm %t) || (www?.co.au* iswm %t) { 
    if (%n !isop %c) && (%n !isvoice %c) {
      .kill %n Auto-kill: dont post url 
      .kline $address(%n,2) Stop Spamming In Our Server
      echo $active $timestamp (4Warn) Punishing $9 with kline for advertise with $1-   
      onotice #wiredreality (#wiredreality/Ops) Kline triggered on $9 for Advertising $1- nickname : $nick in room $chan
      :end
    }
  }
}

AciDcida #177854 01/06/07 05:50 AM
Joined: May 2007
Posts: 7
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: May 2007
Posts: 7
and this anyone know how kick ppl when use away badword i'm mean on raw it should working

Code:
on*.raw 301:*:{
  if (sex iswm $2) {
    mode # +b $address($nick,3)
    kick # $nick You To smart But I'm more smart 
    .timer[Awaymsg] 1 60 mode # -b $address($nick,3) 
  }
}
 


AciDcida #177857 01/06/07 06:54 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
klines and kills, for UnrealIRCd, require IRCops status. If the client running the code doesn't have this access, then it won't work.

AciDcida #177858 01/06/07 06:56 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) Your format for the RAW line is incorrect.
Format should read
Code:
raw 301:*:{
not
Code:
on *.raw 301:*:{


2) The # character in the mode, kick and timer lines, will return $null, as there is no channel associated with the RAW command.

AciDcida #177859 01/06/07 06:57 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: AciDcida
This code kline not working
Code:
 on *@:text:*:#:{
  var %n = $nick,%c = #,%t = $strip($1-)
  if (*www.?.com iswm %t) || (*http://* iswm %t) || (*www.?.org* iswm %t) || (*www.?.net* iswm %t) || (www?.co.uk* iswm %t) || (www?.co.au* iswm %t) { 
    if (%n !isop %c) && (%n !isvoice %c) {
      .kill %n Auto-kill: dont post url 
      .kline $address(%n,2) Stop Spamming In Our Server
      echo $active $timestamp (4Warn) Punishing $9 with kline for advertise with $1-   
      onotice #wiredreality (#wiredreality/Ops) Kline triggered on $9 for Advertising $1- nickname : $nick in room $chan
      :end
    }
  }
}


#1 On your ON TEXT event you made an OP check to start off therefore #1 the script if written correctly would work only if the user who is op advertises. Else remove the @ event leave it has ON *:TEXT:*:#:{

#2 You are using the incorrect WILDCARD term searches for mIRC but then again you are making a match on a $1- event which the wildcard match "ISWM" will only search the first Word therefore if the advertisement is PLEASE VISIT www.MIRC.COM your Wildcard Match will not work

#3 :END is useless unless you need to go to your code later on during a script example

ON *:TEXT:*:#:{
if ($1 == Hi) { GOTO :B }
else { halt }
:B
echo -a You have been routed to B
}

if Hi is said it presents you the echo message else it halts/stops

So now moving on since we talked about thw isWM searches I would recommond $wildtok events in this scenario here is a compilation

Code:
on *:text:*:#:{
  var %n = $nick, %c = #, %t = $strip($1-)
  if ($wildtok(%t,*www.*,1,32)) || ($wildtok(%t,*.net*,1,32)) || ($wildtok(%t,*.org*,1,32)) || ($wildtok(%t,*.co.uk*,1,32)) || ($wildtok(%t,*.co.au*,1,32)) { 
    if (%n !isop %c) && (%n !isvoice %c) {
         .kill %n Auto-kill: dont post url 
      .kline $address(%n,2) Stop Spamming In Our Server
      echo -at (4Warn) Punishing $9 with kline for advertise with $1-   
      onotice #wiredreality (#wiredreality/Ops) Kline triggered on $9 for Advertising $1- nickname : $nick in room $chan
    }
  }
}


voila

Regex would be idealistic here however I don't know how to use it


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
RusselB #177860 01/06/07 06:58 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: RusselB
klines and kills, for UnrealIRCd, require IRCops status. If the client running the code doesn't have this access, then it won't work.


His code had a few errors


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #177861 01/06/07 07:02 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Originally Posted By: Lpfix5
#1 On your ON TEXT event you made an OP check to start off therefore #1 the script if written correctly would work only if the user who is op advertises. Else remove the @ event leave it has ON *:TEXT:*:#:{

Actually the @ event prefix checks if you are opped, not whoever triggered the event.

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Collective
Originally Posted By: Lpfix5
#1 On your ON TEXT event you made an OP check to start off therefore #1 the script if written correctly would work only if the user who is op advertises. Else remove the @ event leave it has ON *:TEXT:*:#:{

Actually the @ event prefix checks if you are opped, not whoever triggered the event.


My bad its true because ME event can be used as well


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #177892 01/06/07 11:13 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Everything mentioned since the OP's first post here can and/or will cause the script to fail.

RusselB #177962 03/06/07 03:19 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Here, you need to change ($2 ison #wiredreality) if you wanted them to be banned from a different channel.
Code:
raw $301:/\bsex\b/Si:{
  if ($2 ison #wiredreality) && ($me isop $v2) { ban -ku60 $v2 $address($2,3) You To smart But I'm more smart }
}


Link Copied to Clipboard