mIRC Home    About    Download    Register    News    Help

Print Thread
#85481 05/06/04 07:05 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
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.

Signature:
I'm boring, ain't I? Oh well...:|
#85482 05/06/04 07:13 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
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.

Code:
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.

"All we are saying is give peace a chance" -- John Lennon
#85483 05/06/04 07:35 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Thanks.. but this was a suggestion..


Signature:
I'm boring, ain't I? Oh well...:|
#85484 05/06/04 08:13 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
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 smile


"All we are saying is give peace a chance" -- John Lennon
#85485 06/06/04 12:56 AM
Joined: Mar 2004
Posts: 36
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Mar 2004
Posts: 36
Code:
 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 smile

#85486 06/06/04 01:05 AM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
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 smile

* Zyzzyx26 wonders if that is documented in the help file, or if it is another one of those hidden tips

smile

Last edited by Zyzzyx26; 06/06/04 01:07 AM.

"All we are saying is give peace a chance" -- John Lennon
#85487 06/06/04 05:30 PM
Joined: Aug 2003
Posts: 309
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Aug 2003
Posts: 309
its a good suggestion.. i would use it smile


-Nick (Darko)
-Admin irc.aussiechat.org
-#Chatzone, #helpdesk
#85488 06/06/04 08:53 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
It's documented in versions.txt, I don't recall seeing it in mirc.hlp but it's possibly in there somewhere.
Code:
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.


#85489 06/06/04 08:55 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, cool smile ty

Edit -> I am used to see /! and not the plain ! - so i thought it was another feature smile

Last edited by Zyzzyx26; 06/06/04 08:56 PM.

"All we are saying is give peace a chance" -- John Lennon
#85490 07/06/04 03:32 PM
Joined: May 2003
Posts: 31
B
Ameglian cow
Offline
Ameglian cow
B
Joined: May 2003
Posts: 31
Just FYI, the equivalent to the /! for identifiers is a ~, like $~me, $~server and so forth. Handy stuff.

Code:
alias md5 { return KABOOM }
//echo -a $md5 | echo -a $~md5


@#HelpDesk - DALnet
#85491 07/06/04 03:44 PM
Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
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)

#85492 07/06/04 04:03 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard