mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2018
Posts: 2
N
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Feb 2018
Posts: 2
Hi I added a join event hook to my scripts/remote.ini that's working fine (it hides the /join message for specific nicks):
Code:
on ^*:join:#:{
  if ( $nick == nick1 || $nick == nick2 ) { haltdef | return }
}


However when adding the equivalent event hooks for /part and /quit to the same remote.ini file:
Code:
on ^*:part:#:{
  if ( $nick == nick1 || $nick == nick2 ) { haltdef | return }
}

on ^*:quit:#:{
  if ( $nick == nick1 || $nick == nick2 ) { haltdef | return }
}


I receive a
Quote:
[01:02 pm] #:{ Unknown command message
message in the irc server channel when a /part or /quit occurs. The documentation suggests the syntax for part/quit should be identical to join for this purpose, so I'm unclear what the issue is. Having each hook in the same file should also be fine since they handle separate events?

I'm running mIRC 7.48 on Windows 10 (64-bit), if anyone knows what's the error here please let me know, thanks.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
The on quit event is not associated with a channel, you alsod don't need to return like that, use on ^*:quit:haltdef


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2018
Posts: 2
N
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Feb 2018
Posts: 2
Oh that does make sense, thank you that worked


Link Copied to Clipboard