Useful aliases

By Fan_Of_Ur_Mom on Jan 20, 2010

Here is a few simple yet useful aliases I've made and I've decided there would be a few people who would/might find them quite handy. You won't use all of them, but you'll probably find one or two of them useful, or none at all. Don't leave a comment on how stupid these scripts are, or how useless they are, I'm aware, it was an idea from someone to give a few of my useful/time saving scripts to people, thus, this snippet.

The first alias, /all will make you, or someone else, owner/admin/op/halfop/voice, to use the command on you just type; /all
To use it on someone else, type /all nickhere
Same with the deall command, except it will remove the status.

The nicks alias, can be useful to many different people, for many different reasons. You can use it to make certain scripts easier/less cluttered, or you can use it to highlight everyone in the channel by typing //say $nicks ... That would be annoying, I don't recommend it.

;;;;;;;;;;;;Easy/fun triggers for opers;;;;;;;;;;;;

The global alias, you have a little bit of changning around to do, where the is, you have to replace it with part of your server url, example, my server "" I would put
This command will notice every user on your network. I know you have /os global, but this one you can personalize and make the message appear however you want it to. :)

Alias Sahop, is quite simple, you have sapart, sajoin, and now sahop, you might find it abusive, but do with it what you will, it's your network. :)

Alias rme is also simple, it will make your server do a /me if you have RAW enabled. Just type /rme yawns.

Alias svskill is a fun little command... You can make people think they pinged out, or some other random thing. /svskill nickhere Ping timeout

There will be more commands added as I see fit or if I decide to make more commands. It won't be updated too often, as I'm not on hawkee too often.

If you have any questions or anything in regard to this snippet, contact me on my network, /server -m

alias all { if (!$1) { mode $chan +qaohv $str($me $chr(32),5) } 
else { mode $chan +qaohv $str($$1 $+ $chr(32),5) } }

alias deall { if (!$2) { mode $chan -qaoh $str($me $chr(32),4) }
else { mode $chan -qaoh $str($$1 $+ $chr(32),4) } }

alias nicks { var %x 1 | while (%x <= $nick(#,0)) { var %r %r $+(\Q,$nick(#,%x),\E) | inc %x } | return $replace(%r,$chr(32),$chr(124)) }

;;;;;;;;;;;;Easy/fun triggers for opers;;;;;;;;;;;;

alias global { notice $ $+ * [ $+ $network Global] $1- }

alias sahop { sapart $1 $chan $2- | sajoin $1 $chan }

alias rme { os raw PRIVMSG # : $+ $chr(1) $+ ACTION $1- $+ $chr(1) }

alias svskill !svskill $1 : $+ $2-


Sign in to comment.
TheNitelyfe   -  Feb 05, 2010

o dats neat

Jethro   -  Feb 05, 2010

TheNitelyfe, the non-regex method which does the same thing:

alias nickz while ($nick(#,$0)) tokenize 32 $1- $v1 | return $2-
TheNitelyfe   -  Feb 05, 2010

alias nickz { return $regsubex($str(@,$nick(#,0)),/./g,$+($nick(#,\n),$chr(32))) }

Fan_Of_Ur_Mom   -  Feb 05, 2010

Eh, the owner part of that script is more so for if you have a server you can use /all on yourself if you have oper override... Also, for the mass highlight deal, I was in a hurry/didn't care to add the spaces, I made that bit of code to match a few scripts in my mIRC and forgot to edit it so the \Q etc.. etc.. wasn't there, here's my edit of it;

nickz { var %x 1 | while (%x <= $nick(#,0)) { var %r %r $nick(#,%x) | inc %x } | return $replace(%r,$chr(32),$chr(32) $chr(124) $chr(32)) }

And as for the all/deall aliases, I was a n00b when I made those, years ago and haven't ever really thought about updating them..

Thanks for the comments. :3

TheNitelyfe   -  Jan 20, 2010

You cannot make yourself an owner, and you can't make yourself admin if you're not an owner, etc.

napa182   -  Jan 20, 2010

i noticed that as well Jethro_

Jethro   -  Jan 20, 2010

I don't get why \Q \E are used...I mean there's nothing regex related or to escape in that while loop...:/

napa182   -  Jan 20, 2010

hmm ur nicks alias returns > \Qnapa182\E|\QSick0\E|\QNapa_Jr\E|\QScanner\E
maybe try

alias nicks return $regsubex($str(-,$nick(#,0)),/(.)/g,$+($nick(#,\n),$chr(32)))

returns > napa182 Sick0 Napa_Jr Scanner
and if you want $chr(124) between the nicks

alias nicks return $regsubex($str(-,$nick(#,0)),/(.)/g,$+($nick(#,\n),$chr(124)))

returns > napa182|Sick0|Napa_Jr|Scanner|

and no need for the else on ur user modes alias as sated by the others

alias all { mode # +qaohv $str($iif($1,$1,$me) $chr(32),5) } 
alias deall { mode # -qaohv $str($iif($1,$1,$me) $chr(32),5) }

and master-of-death the on input you could do it like this

on *:input:*: { if ($regex($1,/^([+-][qaovh])$/)) { mode # $regml(1) $iif($2,$2,$me) } }

but whatever.....

Master-Of-Death   -  Jan 20, 2010

Sorry Jethro_ I was in a rush and didn't have time to check it, next time I will.

gooshie   -  Jan 20, 2010
Jethro   -  Jan 20, 2010

I don't see the benefit of using input event for this. While using regex can save you a good deal from typing many commands, you need to be sure that multiple mode sets need to have more than one $nick in place. It's useful to take advantage of $modespl as well.

Also, Master-Of-Death, I don't believe you can use regex within the input event match. You need to use $regex() identifier. Thus your example will fail to work.

P.S. It's a good idea, before commenting on a snippet, to make sure you know what you're doing so that your example does not appear misleading.

Master-Of-Death   -  Jan 20, 2010

You can combine the top two into on on INPUT event by using regex and $iff

Syntax = < +/- qaohv > < $2 >

on $*:INPUT:/((\+|-)(\S+))/:#:{ 
raw -q MODE # $regml(1) $iif(!$2, $me, $2)

or if you want to keep it in an alias you could use:

alias amode {
raw -q MODE # $1- $iif(!$2, $me, $2)

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.