mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2024
Posts: 2
G
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Apr 2024
Posts: 2
Hi,
i have a channel on undernet and get a few trools frequently. I usually kick/ban them with "/msg x@channels.undernet.org ban #channel *!*@ip1.*,ip2.*,ip3.* 3h "
That works well for one or 2 lines. I want to script so I can send several lines to X. I know I can open a query window to a nick and use the /play "text" 1500. But that is not working with sending X Commands. Any help is much appreciated.

Joined: Nov 2021
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 103
It's not clear to me what kind of abuse or trolling it is they are doing on the channel in order to determine what kind of script would be fit to counter that.

Im curious to know what they do exactly.

Joined: Nov 2021
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 103
you could try this :

Code

alias Xban {
  var %chan = $active |  if (%chan !ischan) { echo -stac own  This command can only be done on a channel. | halt }
  if ($nick( %chan ,$me,@)) {
    var %i = 1 | while ($gettok($1-,%i,32)) {
      var %user =  $gettok($1-,%i,32) 
      if ($nick($chan,$me,@) && !$nick($chan, %user ,@) && !$istok( $me , %user ,32)) { var -u3 %nm = $addtok(%nm,$address( %user ,2),44) }
      if ($numtok(%nm,44) == 10) { msg x@channels.undernet.org ban  %chan $numtok(%nm,44) -  %nm | 
      unset %nm }
      inc %i
    }
    if (%nm) { msg x@channels.undernet.org ban  %chan  $numtok(%nm,44) -  %nm }
  }
}


Joined: Nov 2021
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 103
i made a mistake with the ban syntax this one should be fine from what i understood is X uses a max of 10 bans per line wich is what i added.

Code

alias Xban {
  var %chan = $active |  if (%chan !ischan) { echo -stac own  This command can only be done on a channel. | halt }
  if ($nick( %chan ,$me,@)) {
    var %i = 1 | while ($gettok($1-,%i,32)) {
      var %user =  $gettok($1-,%i,32) 
      if (!$nick($chan, %user ,@) && !$istok( $me , %user ,32)  && %user ison %chan) { var -u3 %nm = $addtok(%nm,$address( %user ,2),44) }
      if ($numtok(%nm,44) == 10) { msg x@channels.undernet.org ban %chan %nm | unset %nm }
      inc %i
    }
    if (%nm) { msg x@channels.undernet.org ban %chan %nm }
  }
}



Joined: Apr 2024
Posts: 2
G
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Apr 2024
Posts: 2
I just found out that X no longer supports 10 entries per line. So i guess the only way is to read the ip's from a list and add them one line at the time.

Joined: Nov 2021
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Nov 2021
Posts: 103
At this point its not clear to me what exactly you sre looking for because these lines you mention could mean anything also i tested myself on undernet and undernet supports 6 mode settings in 1 line like +bbbbbb wich is what i utilized now the code could be modified but only if elaborate to detail exactly what it is you want script to do.


Link Copied to Clipboard