mIRC Home    About    Download    Register    News    Help

Print Thread
#48179 09/09/03 06:21 AM
M
MaGoScUrO_
MaGoScUrO_
M
on 20000:open:?: if $Nick = nickserv .echo @window $1-


[03:08] -NickServ- VerDuGo is oioioioikmnhjkjkhjk
-
[03:08] -NickServ- Is online from: ~asdsadad@5CCFDBC.8EBFDE7.1B3BF12C.IP
-
[03:08] -NickServ- Time registered: Jul 30 17:20:03 2003 ART
-
[03:08] -NickServ- Last quit message: Quit:
-
i try to send this stuff to a window


any help?
thnx


P.D. the 20000 Is a user 20000 nickserv

#48180 09/09/03 07:42 AM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
I'm not sure 20000 is still an acceptable userlevel, but if it is,
Code:
[color:green]; on notice event to trigger[/color]
on ^20000:notice:*:?: {
  [color:green]; if NickServ is the only 20000 user you won't need the if[/color]
  if ($nick != NickServ) halt
  [color:green]; make sure the window is opened![/color]
  if (!$window(@nickserv)) window @nickserv
  [color:green]; send to window[/color]
  aline @nickserv $timestamp $1-
  [color:green]; block default output[/color]
  haltdef
}  

#48181 09/09/03 08:03 AM
Joined: Jan 2003
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 149
Not tested but must work grin

Code:
on ^*:NOTICE:*:?:{
  if (($nick == ChanServ || $nick == NickServ || $nick == MemoServ) && $_chk.service($nick)) {
    if (!$window($+(@,$nick,_,$cid))) { window -Bemizvk[0] $+(@,$nick,_,$cid) }
    echo -t $+(@,$nick,_,$cid) $1-
    haltdef
  }
}
alias _chk.service { return $iif($numtok($notify($1).addr,64) == 2,$true,$false) }
;Nice xtra to check if it's real service

#48182 09/09/03 08:58 AM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
Actually - you should test the code and be complete. $notify won't work unless you /notify the nick first. Second, your $numtok doesn't work at all on services. Each networ has it's own. The format of the services mask depends on which network you are on, so unless you add checks for that as well, it's pointless.

Also -- $numtok($notify($1).addr,64) == 2 will check if the user's mask contains a @ and two tokens separated by this. Every user's mask is made up that way, so how would it detect if the user is a services or not?

Further, the user mentioned something about having added nickserv to the userlist, you do not use that, and the if statement you do use isn't fullproof since you can easily spoof nicks, even services nicks.

The addition of the server-specificness is nice, but otherwise the post doesn't add to what I posted, and is actually worse.

#48183 09/09/03 09:42 AM
Joined: Jan 2003
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 149
since I'm chatting only on Ircnet and local (CR) chat servers... I tested it in IrcNet, DalNet and it works... for other networks dunno... normaly services mask contains no $chr(46)

so we can add this check:
$numtok($notify($nick).addr,46) == 1

any suggestions welcomed grin

Last edited by J0ke; 09/09/03 09:57 AM.
#48184 09/09/03 02:18 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I have a few suggestions.
Firstly,
Test it on the other IRC Networks, if works it on Conference Room, how can you be sure it works on other IRC Networks that use wIRCD, UnrealIRCd etc.

Secondly, before you make anymore excuses about it is late and you are tired, go to bed, you are obviously needing sleep, I was like that, staying up 24/7, I was awake a whole week, but then I got ill as a result of lack of sleep, it probably sounds stupid I know but it is true, just didn't want that to happen you you. grin

#48185 09/09/03 02:20 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
DALnet services hostmask: NickServ!service@dal.net. Since $chr(46) == @, all DALnet services hostmasks contain a @, so your services check returns $true.

However, any NORMAL user will have the exact same format -- nick!identd@host.domain -- so your check will return $true for them too...

#48186 09/09/03 02:32 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
You have it the wrong way round, unless my mIRC is up the creak.
$chr(46) returns . ( fullstop )
If you meant the @ sign, well $chr(64) returns that.

#48187 09/09/03 06:33 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
argh, yer right.

#48188 09/09/03 06:44 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Yup, for once. lol.


Link Copied to Clipboard