mIRC Homepage
Posted By: ErikMouse Script Issues - 30/08/21 06:17 PM
Hi, I had this in the remote of a mIRC client that I was using as a bot and it was working fine a month ago during the time I had botnets connecting to my server and spamming. Lately, it is ignoring everything I have listed and going to 'else' and I have not changed anything.

Code
on +200:SNOTICE:*client connecting at palace.morphforest.com*:{
  if ($8 == norenxaq) { /msg #Zen-Activity $8 is safe }
  if ($8 == EricMouse) { /msg #Zen-Activity $8 is safe }
  if ($8 == ErikMouse) { /msg #Zen-Activity $8 is safe }
  if ($8 == MFServ) { /msg #Zen-Activity $8 is safe }
  else { /msg #Zen-Activity $8 }
}


And what the client sees when anyone connects to it is "-anthropia.morphforest.com- *** Notice -- Client connecting at palace.morphforest.com: EricMouse (erikmouse@hostmask)
Posted By: Loki12583 Re: Script Issues - 30/08/21 07:33 PM
Nothing in your message has "MFServ" so it falls into the else.
Posted By: Epic Re: Script Issues - 30/08/21 07:44 PM
You forgot to explain what your script should do, but I think I already guessed about it.

Probably, this script should notify you on the specified channel about who is connecting to your server and should give a characteristic for certain nicknames, whose behavior you already know before.

Try using code like this:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Fool,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Bad user,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Unknown user,,$chr(41))
  }
}

In lines: "if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32))" - you must list separated by a space all nicknames with which you are already familiar.

If I made a mistake in my conclusions about the task of the script, then please describe the necessary in more detail.

Posted By: ErikMouse Re: Script Issues - 30/08/21 08:12 PM
Originally Posted by Epic
You forgot to explain what your script should do, but I think I already guessed about it.

If I made a mistake in my conclusions about the task of the script, then please describe the necessary in more detail.
Sorry, I forgot the explain that I ended up creating that script to temporary z:line for a month all connections to the server except those that were excepted such as norenxaq, ErikMouse, EricMouse, and MFServ.
Posted By: Epic Re: Script Issues - 30/08/21 08:52 PM
Are you sure that you want your server to be visited only by the specified 4 people (nicknames), and all the rest should be immediately (Z:line) banned when connecting for up to 30 days ??? o_0

This idea seems very bad to me. But if you insist, please me the complete correct syntax for the "ZLINE" command on your server.

Or, you can independently supplement this script with the necessary lines with commands, indicating them below the messages in the corresponding condition for checking.


Posted By: ErikMouse Re: Script Issues - 30/08/21 08:59 PM
Originally Posted by Epic
Are you sure that you want your server to be visited only by the specified 4 people, and all the rest should be immediately banned when connecting for up to 30 days ???

This idea seems very bad to me. But if you insist, please me the complete correct syntax for the "ZLINE" command on your server.

Or you can independently supplement this script with the necessary lines with commands below under the appropriate conditions for checking.


Well, I just have it as a temporary script while I have spambots connecting to the server, but usually I have it turned off and allow anyone to connect sometime after the spambots have stopped trying to connect.
Posted By: ErikMouse Re: Script Issues - 30/08/21 09:03 PM
Oh, and the complete correct syntax for the GZLINE command on my server is
Code
/gzline <hostmask> +30d Open Proxy
and is the command I use when I got major spambot problems.
Posted By: Epic Re: Script Issues - 30/08/21 10:05 PM
Well, then, based on your requirements, you can try using this script:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    var %cc_zline $+(*@,$gettok(%cc_mask,2,64))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Jester Fool Boob Dummy,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Local clown,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Potential intruder,,$chr(41))
    .gzline %cc_zline +30d You came at the wrong time and fell under the distribution, the next attempt to get into our network you will have in 30 days.
  }
}

Posted By: ErikMouse Re: Script Issues - 31/08/21 12:30 AM
Originally Posted by Epic
Well, then, based on your requirements, you can try using this script:
Code
on *:SNOTICE:*Client connecting*: client_connecting $1-
alias -l client_connecting {
  var %cc_snotice $strip($1-)
  var %cc_server $gettok(%cc_snotice,1,58)
  if (palace.morphforest.com isin %cc_server) {
    var %cc_chan #Zen-Activity
    var %cc_user $gettok(%cc_snotice,2,58)
    var %cc_nick $gettok(%cc_user,1,32)
    var %cc_mask $remove($wildtok(%cc_user,*@*,1,32),$chr(40),$chr(41))
    var %cc_zline $+(*@,$gettok(%cc_mask,2,64))
    if ($istok(ErikMouse EricMouse norenxaq MFServ,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),03,Good user,,$chr(41)) | halt
    }
    if ($istok(Troll Jester Fool Boob Dummy,%cc_nick,32)) {
      msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),07,Local clown,,$chr(41)) | halt
    }
    msg %cc_chan 10Сonnected: $+(,%cc_nick,) %cc_mask -> $+($chr(40),04,Potential intruder,,$chr(41))
    .gzline %cc_zline +30d You came at the wrong time and fell under the distribution, the next attempt to get into our network you will have in 30 days.
  }
}


Just to let you know, I had tested out this script in my mIRC bot client and it worked correctly. The only thing is I need to change
Code
.gzline %cc_zline +30d
to
Code
.gzline %cc_nick +30d
instead to where it is doing
Code
/gzline <nick> +30d
instead since the server translates the nick to the IP address of the connecting nick, and
Code
/gzline <hostmask> +30d
was resulting in the following.

Code
-anthropia.morphforest.com- ERROR: (g)zlines must be placed at *@ipmask, not user@ipmask. This is because (g)zlines are processed BEFORE dns and ident lookups are done. If you want to use usermasks, use a KLINE/GLINE instead.
Posted By: Simo Re: Script Issues - 07/11/21 11:40 PM
There is a far easier way to prevent uninvited guests from joining wich is to use password to be able to connect and allow ssl only but thats just another layer the password should do and also use a non default port to connect to and share with your friends of course so they can connect this should guarantee you peace on your server

I run a test net myself so i tried to come up with all kinds of solutions let me know how it worked out so we may try other solutions as there are various
© mIRC Discussion Forums