mIRC Home    About    Download    Register    News    Help

Print Thread
#12414 22/02/03 01:51 PM
Joined: Jan 2003
Posts: 108
H
Vogon poet
OP Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
Is there any way to match all the address's without redefining them over and over. For instance using $address($me,5) seems to catch a number of them, although not all. Basically im looking for a address matching system (for all the address's).

#12415 22/02/03 04:58 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
All the addresses? All the addresses where? Redefining what? I'm confused...now look what you've done...

$address(nick,5) returns nick!user@host, are you looking for something that returns more information than that? If so, what information do you want?

#12416 22/02/03 05:07 PM
Joined: Jan 2003
Posts: 108
H
Vogon poet
OP Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
Well I just completed a mode parse'er, and im matching address's with mine. Any instance of an address that matches mine im going to perfom a specific command. Thats not my problem though. Im trying to figure out a way that allows me to catch all the address's with mine, or at least compares them, without redefining and comparing each address. I used $address($me,5) because it usually serves that purpose.

#12417 22/02/03 05:09 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
*Watchdog is lost...

#12418 22/02/03 05:13 PM
Joined: Jan 2003
Posts: 108
H
Vogon poet
OP Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
hehe with what part?

#12419 22/02/03 05:20 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I'm just trying to work out what modes have to do with addresses and how someone elses address can match yours...

#12420 22/02/03 05:23 PM
Joined: Jan 2003
Posts: 108
H
Vogon poet
OP Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
no no ill give you an example
----
someone sets a mode: +ee Hindsight!*@* *!hindsight1@mask-18480.rr.com
----
Usually when someone sets a mode like that, and your trying to match addresses you can do a $address($me,5) to match the address with your own. For some reason, this wont work with these kind of modes smirk. I need something that will compare all possible addresses with my own.

#12421 22/02/03 05:29 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You just use if (address iswm $address($me,5)) { commands }


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#12422 22/02/03 05:33 PM
Joined: Jan 2003
Posts: 108
H
Vogon poet
OP Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
Ive tried that, it works for about half the time.

#12423 23/02/03 08:04 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
In BAN and UNBAN events, you can use ($banmask iswm $address($me,5)).
Code:

on *:BAN:#: if ($banmask iswm $address($me,5)) echo $color(ctcp) -ebfirt $chan * BANNED! (by $nick $+ )
on *:UNBAN:#: if ($banmask iswm $address($me,5)) echo $color(info2) -ebfirt $chan * WHEW! Unbanned by $nick $+ !

If you're using on RAWMODE, though, you'll have to parse the mode string yourself (naturally).
Code:

on *:RAWMODE:#:{
  
  var %+-                             | ; Setting or unsetting modes
  var %modecount = 0                  | ; Which parameter is affected by this mode change
  var %i = 1                          | ; Loop index to loop through $1 (the mode list)
  var %fulladdress = $address($me,5)  | ; My address
  
  while ($mid($1, %i, 1)) {
  
    var %char = $ifmatch
  
    if %char == + $&
      %+- = 1
  
    elseif %char == - $&
      %+- = 0
  
    else {
      inc %modecount
      var %param = $gettok($2-, %modecount, 32)
      if (%char !isin ciklmnoprstv) && ([color:red]%param iswm %fulladdress[/color]) {
        if %+- {
  
          echo $color(info) -bfirt $chan * $nick has set /MODE $chan $+(+,%char) %param on you
  
          ;  Whatever you plan on doing about it, insert that code here (probably based on 
          ;  what the mode is that they set. I have put these into two completely different
          ;  sections assuming that you'll want to do different things if the mode is being
          ;  set or unset.
  
        } | else {
  
          echo $color(info) -bfirt $chan * $nick has set /MODE $chan $+(-,%char) %param on you
  
        } 
      }
    }
    inc %i
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard