mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 1
T
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Apr 2014
Posts: 1


Joined: Jul 2006
Posts: 4,180
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,180
What you call normal notification are called "tip"
You can create tip with $tip (/help $tip) and edit them with /tip


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I tried doing this
Code:
on *:text:*:#: { 
  $tip(Message, $nick # $server, $1-) 
}
But each time this event would happen I would also get a notification in my status window saying
Quote:
2 Unknown command
-
3 Unknown command
-
3 Unknown command
-
4 Unknown command
-
4 Unknown command


EDIT: Nevermind, I obviously wasn't using my head before making this comment. I made it into a variable instead, and now I realized I can use this to different scenarios, but since I don't want to do anything special, I'll just leave it like that. Just to avoid calling out an alias.

Last edited by Nillen; 20/04/14 02:54 PM.

Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Maybe like this:
Code:
on *:text:*:#:{
  noop $tip(tip,$network # - $nick,$1-)
}


Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Ooo, I see!
Just read up on it on the wiki as well and help files.
Quote:
The /noop command simply discards all the values after evaluating its arguments like mIRC would in an ordinary command. This is useful for identifiers that return a value but you do not wish to do anything with these values.
Quote:
Performs no operation, parameters are evaluated as with a normal command.
Is there anything apart from $tip that calls out to an alias by default?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2004
Posts: 1,360
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,360
$tip does not "call out to an alias". $tip has a return value, you used it at the beginning of the a line, so the return value is used as a command. Any identifier will do the same.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Allow me to rephrase. Are there any other scenarios/identifiers that /noop will come in handy with?
$read reads a file and returns a value. I can use this value for w/e I want. Typically in a message.
$tip returns a value for which tip it goes to. Nothing practically useful comes to mind.



Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2004
Posts: 1,360
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,360
$com, $dll, $read, $regex, $compress, $decompress, $encode, $decode, $hget, passing spaces into $1 or $2

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
The use of $tip() value comes to mind smile

Code:
alias testtip {
  if !$timer(tip) { .timertip 0 3 testtip }
  var %test $gettok(Hi Hello Blah Hah Bye Okay,$rand(1,6),32)
  var %tip $tip(tip,%test,%test,15)
  if %tip > 3 { beep }
  if %tip > 6 { 
    if $input(Help! I got too many tips! $+ $crlf $+ Disable tip?,y,tip) {
      .timertip off 
      noop $tip(tip,Tip Disabled,Horay,15)
    }
  }  
}  


Link Copied to Clipboard