|
|
GalaxeY
|
GalaxeY
|
What about add hopall?
And if you are on more than one server.. nickall or something?
Last edited by GalaxeY; 05/06/04 07:14 PM.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
alias hopall {
var %i 0, %commands = partall $1-, %channels
while (%i < $chan(0)) {
inc %i
if ($chan(%i).key) { var %commands = $addtok(%commands,join -n $chan(%i) $ifmatch, 124) }
var %channels = $addtok(%channels, $chan(%i), 44)
}
tokenize 124 %commands
$*
if (%channels) .timerHOPALL 1 4 /join -n $ifmatch
} The code is not mine, i got it in another forum board. alias nickall {
scid -at1 nick $1
} This one should work too (tested) Edit: Found an error in the /hopall alias - working on it. Zyzzy.
Last edited by Zyzzyx26; 05/06/04 07:29 PM.
|
|
|
|
GalaxeY
|
GalaxeY
|
Thanks.. but this was a suggestion..
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
alias hopall {
var %i = $chan(0), %chans, %keys
while (%i) {
if (k isin $chan(%i).mode) { var %keys = $addtok(%keys,$chan(%i).key,44) }
var %chans = $addtok(%chans,$chan(%i),44)
dec %i
}
partall
.timerHOPALL 1 4 join -n %chans %keys
} This one works, however, i found out (by testing over and over this alias) that in some networks you cannot see or retrieve the channel key if you are not an @Op (or if you haven't been opped in the channel). Yes, i know it was a suggestion, but until (and IF) it gets implamented by Khaled, you can use those as a workaround. Zyzzy
|
|
|
|
Nodren
|
Nodren
|
alias nickall { scid -at1 !nick $1 } That works better, if a script has its own "/nick" command to catch some sort of event when /nick is used, the command you had would send mIRC into a loop that only ctrl+break could break. so if you prefix the command with a ! you dont run the risk of that error
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
That is quite interesting! Although the command wouldn't send to an endless loop - as far as i know - (since it only changes the nick once, when you type it) it's good to know about that ! thingie * Zyzzyx26 wonders if that is documented in the help file, or if it is another one of those hidden tips
Last edited by Zyzzyx26; 06/06/04 01:07 AM.
|
|
|
|
Joined: Aug 2003
Posts: 297
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 297 |
its a good suggestion.. i would use it
|
|
|
|
Iori
|
Iori
|
It's documented in versions.txt, I don't recall seeing it in mirc.hlp but it's possibly in there somewhere. versions.txt: 02/02/2000 - mIRC v5.7
90.You can now prevent a command from being processed as an alias by
prefixing it with a ! character, eg. /!command etc.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Oh, cool  ty Edit -> I am used to see /! and not the plain ! - so i thought it was another feature 
Last edited by Zyzzyx26; 06/06/04 08:56 PM.
|
|
|
|
Bleepy
|
Bleepy
|
Just FYI, the equivalent to the /! for identifiers is a ~, like $~me, $~server and so forth. Handy stuff.
alias md5 { return KABOOM }
//echo -a $md5 | echo -a $~md5
|
|
|
|
Joined: May 2003
Posts: 161
Vogon poet
|
Vogon poet
Joined: May 2003
Posts: 161 |
You can't override $identifiers with aliases at all. There is no $md5 identifier, it needs a parameter, like $md5(x)
|
|
|
|
Joined: Jan 2003
Posts: 2,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
As Ashkrynt said in other words, the reason $md5 returns "kaboom" is that $md5 and $md5() are two different identifiers, as far as mirc is concerned. It appears that the ~ in $~blah bypasses the alias of the same name, but this wouldn't make any difference, as built-in identifiers have priority over custom ones (the opposite situation between built-in /commands and aliases). The closest thing to a usage of ~ would be script support for future identifiers. Eg, //echo -a In a future mirc version $!~qwerty will be implemented and this will not be empty: $~qwerty So in any version prior to that hypothetical future version, $~qwerty will always be $null, even if you have a custom identifier named qwerty. But considering that we never get announcements for future identifiers, I don't see who would use this.
|
|
|
|
|
|