|
Joined: Jan 2003
Posts: 108
Vogon poet
|
OP
Vogon poet
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).
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
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?
|
|
|
|
Joined: Jan 2003
Posts: 108
Vogon poet
|
OP
Vogon poet
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.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
|
|
|
|
Joined: Jan 2003
Posts: 108
Vogon poet
|
OP
Vogon poet
Joined: Jan 2003
Posts: 108 |
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
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...
|
|
|
|
Joined: Jan 2003
Posts: 108
Vogon poet
|
OP
Vogon poet
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  . I need something that will compare all possible addresses with my own.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Jan 2003
Posts: 108
Vogon poet
|
OP
Vogon poet
Joined: Jan 2003
Posts: 108 |
Ive tried that, it works for about half the time.
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
In BAN and UNBAN events, you can use ($banmask iswm $address($me,5)).
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).
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
|
|
|
|
|