mIRC Home    About    Download    Register    News    Help

Print Thread
#248946 07/11/14 03:15 AM
Joined: Jul 2013
Posts: 24
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jul 2013
Posts: 24
Hi..is there a way for mIRC to "read" the real name field of a user joining a channel, and act on the results of it's findings? The reason I'm asking is because we are being spammed quite frequently but the user always changes his host/IP, however, his real name field is always the same, so if I could find a way to ban based on their real name it would be a huge accomplishment.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
It depend on the IRC Server ircd - irc services. it's better to ask on the help support room of the server that you are using try use: /list help or join into #Help (not sure) and ask there.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Are you sure you're not talking about the ident part?
You can't ban on the realname, it's not part of an address/host, you could ban the address depending on the realname but that wouldn't prevent that user from joining again if his host/ip, there is basically nothing that can be done to someone changing is host/ip, he is just a new user,


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
@Wims: You can ban the realname on UnrealIRCd.
Code:
/mode #chan +b ~r:Realname


@EasyObserver: I've written something for this before, maybe you could use it.
Code:
menu Channel,Nicklist,Menubar,Status {
  -
  Real name Checker
  .$iif($timer(.Recheck),$style(1)) Enable:.timer.Recheck $iif($timer(.Recheck),off,1 %RN.Delay GetName.Checker)
  .-
  .Set Real names:set %RN.Check $$input(Separated by semi-colon,e,Real name checker,%RN.Check)
  .Exception?:var %ex = $$input(Separated by semi-colon,e,Exception list,%RN.Exception) | $iif(%ex != $null,set,unset) %RN.Exception %ex
  .-
  .Set Delay $+($chr(40),$iif(%RN.Delay != $null,every $v1 $+ s,Not set yet),$chr(41)):set %RN.Delay $$?="Enter a number from 1 to 60"
  .-
  .$iif(%RN.Wise == 1,$style(1)) Use Wise Method:set %RN.Wise $iif(%RN.Wise == 1,0,1) | unset %RN.Last
  -
}

on !@*:Join:#:{ GetName $nick }

alias -l GetName {
  if ($1) && ($timer(.Recheck)) {
    if (!$hget(GetName)) { hmake GetName }
    if (!$hget(GetName,$1)) { hadd -m GetName $1 !@! }
  }
}

alias GetName.Checker {
  if (%RN.Delay == $null) { set %RN.Delay 1 }
  if (%RN.Wise == 1) && (%RN.Last != $null) goto Jump
  var %x = 1
  while ($hget(GetName,%x).item) {
    var %item = $hget(GetName,%x).item
    if ($hget(GetName,%item) == !@!) {
      .enable #WhoisHalt
      set %RN.Last -u60 %item
      !whois %item %item
      break
    }
    inc %x
  }
  :Jump
  .timer.Recheck 1 %RN.Delay GetName.Checker
}

alias -l TakeAction {
  if ($1) {
    var %x = $hget(GetName,$1)
    if ($wildtok(%RN.Check,%x,0,59)) { 
      if ($wildtok(%RN.Exception,%x,0,59)) goto Jump
      var %i = 1
      while ($comchan($1,%i)) { ban -k $v1 $1 2 You're not welcome! | inc %i }
      :Jump
      hdel GetName $1
      unset %RN.Last
    }
  }
}

#WhoisHalt off
raw *:*:{
  if ($istok(307 310 311 312 313 317 318 319 330 338 379 378 318 401,$numeric,32)) haltdef
  if ($numeric == 311) { hadd -m GetName $2 $strip($6-) | TakeAction $2 }
  elseif ($numeric == 318) { .disable #WhoisHalt }
  elseif ($numeric == 401) && ($hget(GetName,$2).item) { hdel GetName $2 }
}
#WhoisHalt end


I should mention that this kind of ban totally depends on the IRCd that the target server is running. This will only work on UnrealIRCd based networks.
(Although this code can be used on any IRCd, since it doesn't use ~r:. It just checks for realname that you specified in its settings using /whois.)


Nothing...
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Right! Didn't know about this, then it's indeed depending on the ircd used


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I told you that before that it depends on the ircd above blush


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2013
Posts: 24
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jul 2013
Posts: 24
Thanks very much, I have a guy looking at it to see if we can get it working on Undernet.

Joined: Jul 2013
Posts: 24
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jul 2013
Posts: 24
No..not the ident or host/IP, I know how to ban using those. We just have this guy that keeps joining and spouting racial slurs using different idents, host/IP's but the real name field is always the same.

Joined: Jul 2013
Posts: 24
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jul 2013
Posts: 24
So far not having much luck getting it running on Undernet. I know this may sound like a stupid question..but did you write it for mIRC or was it written for a different client?

Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
It's an mSL code. and you need to configure it first. (Right click on Channel/Nicklist/Status window...)


Nothing...
Joined: Jul 2013
Posts: 24
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jul 2013
Posts: 24
Masoud...my apologies, I forgot to thank you and let you know that we got this script working on Undernet and it works like a charm...just took a little bit of work by a good friend of mine. Thanks very much for giving us the insight to what we were looking for, much appreciated.

Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
No problem,
You're very welcome.


Nothing...
Joined: Mar 2007
Posts: 41
E
Ameglian cow
Offline
Ameglian cow
E
Joined: Mar 2007
Posts: 41
i need modify this script

nick and real name if found script ban him

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
[Notice: Thread resurrection from >3 years ago]

Hello EvilHeart. You'll be glad to know that as of several months ago, the ability to do this has been made easier, but how you accomplish it will depend on the network server you are on and which features they support.

Some networks support a form of EXTBAN which may allow for direct banning of a gecos. Freenode allows this via $r:gecos?goes?here and $x:*!*@*#gecos?goes?here ban masks.

Alternately, you can write a script that loops through each $nick(#chan,%i) and examines $ial(%nick).gecos for a matching pattern, banning that $address(%nick,N) when a match is found.

In order for $ial(%nick).gecos to work, a /ialfill #chan must have been performed at least once since you joined, AND, the server must either support CAP extended-join or you must manually perform a /who $nick on each person as they join the channel (expensive). So your results will vary depending on the network capabilities.

It's pretty straight forward from here, so I'll leave you to the actual task of scripting it so you may achieve a sense of accomplishment.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard