Here's a little script that I created for my own personal use, it's nice and quick, and easy to use.
Here's what it does...
On input where the input text is "!ident" without quotations, if you are an op on the channel it will simply deop you. However if you are not an op, typing in !ident will define you as a room owner, or mod (aop).
Works for chatspace because it makes use of the /services identify # Pass command.
You'll need to change the value of "PASSWORD" to your room owner/mod password though, and !ident will then be useful for quick deop and opping on your own nickname.
on *:INPUT:#:{
if ($me isop $chan) && (($1 == !ident)) {
/mode # -o $me
}
elseif (($1 == !ident)) {
/services identify # PASSWORD }
}
Why did you put a $1 in replacement for the actual Password though? The $1 is the identifier for the pass. If your pass stays the same, you can have it hard-coded as intended. The $1 should have been $$1 (with double dollar signs) so that it must be filled before the script will trigger. If you choose to have it with single dollar sign, you must make an if condition as in: if ($1) { or else the script will trigger if $1's value is not filled.
I keep most of my code clean in that area so when I add them I don't seem to have a problem. saves time for me having to keep track of the remote scripts I have loaded in case a specific alias isn't there. For big aliases though, then i'll keep them added as a separate remote script though.
I create my own little seperators by starting a line off with a comment semicolon.
something like
;--------------------------------------------------
works for me to separate my aliases into categories if needed, but I only have one of those separators now.. seems a bit unorthodox but it does help me visualize a separation between my needed aliases and my custom ones lol
that would work I guess, but it doesn't show the "!ident" value in the channel. I kind of like it showing, then when someone else tries it to thinking that it's an actual command nothing happens for them haha.
Also, i would just put it in the aliases as
/ident {
if ($me isop #) {
mode # -o $me
return
}
services identify # Pass
}
}
If i was to do it that way... Why did you put a $1 in replacement for the actual Password though?