mIRC Home    About    Download    Register    News    Help

Print Thread
are these kinds of notifications possible in mirc? #245391 19/04/14 08:11 PM
Joined: Apr 2014
Posts: 1
T
TheDuriel Offline OP
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Apr 2014
Posts: 1


Re: are these kinds of notifications possible in mirc? [Re: TheDuriel] #245392 19/04/14 11:47 PM
Joined: Jul 2006
Posts: 3,621
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,621
What you call normal notification are called "tip"
You can create tip with $tip (/help $tip) and edit them with /tip


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: are these kinds of notifications possible in mirc? [Re: Wims] #245401 20/04/14 02:33 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: are these kinds of notifications possible in mirc? [Re: Nillen] #245403 20/04/14 03:32 PM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Maybe like this:
Code:
on *:text:*:#:{
  noop $tip(tip,$network # - $nick,$1-)
}


Re: are these kinds of notifications possible in mirc? [Re: blessing] #245405 20/04/14 04:15 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: are these kinds of notifications possible in mirc? [Re: Nillen] #245423 21/04/14 03:24 AM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
$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.

Re: are these kinds of notifications possible in mirc? [Re: Loki12583] #245424 21/04/14 09:30 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: are these kinds of notifications possible in mirc? [Re: Nillen] #245426 21/04/14 11:52 AM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
$com, $dll, $read, $regex, $compress, $decompress, $encode, $decode, $hget, passing spaces into $1 or $2

Re: are these kinds of notifications possible in mirc? [Re: Loki12583] #245430 21/04/14 12:42 PM
Joined: Apr 2014
Posts: 191
B
blessing Offline
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)
    }
  }  
}