mIRC Home    About    Download    Register    News    Help

Print Thread
#247488 05/08/14 12:18 AM
Joined: Mar 2014
Posts: 65
E
Exuviax Offline OP
Babel fish
OP Offline
Babel fish
E
Joined: Mar 2014
Posts: 65
I used to know how to do this, but I haven't done it in so long. So basically, I want every script to use the same %Warning time through aliases. So if I use

Code:
on *:text:!warning *:#:{
  msg # Warning timeout set to $2 $+ .
  set alias %warning = $2
}


It will then set an aliases to $2 that I can then call upon in another script by using the identifier.

Also, for an added bouns, can I make the alias channel specific, so each channel can make their own warning time?

Thanks!


I do things with stuff that makes other things do stuff.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Store the value wherever, a wise man once told me to stop using dynamically named global variables and switch to .ini files for easier access. Best thing I've ever done.

Code:
on *:text:!warning &:#: { 
if ($2 !isnum) halt
writeini bot.ini warnings # $2
msg # Warning system currently set to: $2 seconds. 
}

;Syntax: $warn(#)
alias warn { return $iif($readini(bot.ini,warnings,$1),$v1,600) }

/* 
Example usage

on *:text:!test:#: { 
echo -ag $nick has been warned for $warn(#) seconds.
}

*/


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard