Hello im god425. Well this is my frist time posting on hawkee.com
on Owner:TEXT:#:{
if ($1 == !voice)
mode $chan +v nick
}
if ($1 == !Devoice)
mode $chan -v $nick
}
if ($1 == !op)
mode $chan +o $nick
}
if ($1 == !deop)
mode $chan -o $nick
}
If ($1 == !halfop)
mode $chan +h $nick
}
if ($1 == !dehalfop)
mode $chan -h $nick
}
if ($1 == !protect)
mode $chan +a $nick)
}
if ($1 == !deprotect)
mode $chan -a $nick
}
if ($1 == !join)
/join $2
msg $chan i join the channel>
}
if ($1 == !part)
/part $chan
parting channeling now $nick.
}
if ($1 == !nick)
/nick $nick
}
if ($1 == !comamnds)
msg $nick My commands are !voice, !op, !join, !part, !halfop, !dehalfop,
msg $nick !protect, !deprotect, !devoice, !deop, !nick
Master of death, you don't have to include the exclamation mark in the $regml(1) to return. Thus you don't even have to use $remove() in the first place. Check this out:
alias test if $regex($1,/!(master)/i) { echo -a $regml(1) }
/test !master will return: master
But if you include it in the enclosed matching range like this:> alias test if $regex($1,/(!master)/i) { echo -a $regml(1) }Then it'll return: !master
When you use $regml() you must enclose the regex pattern with a set of parenthesis.
@Master-Of-Death
no need for the if $me line as well no need for the $remove.
here is the same as ur's without the $me !isop line and the $remove
on $@*:TEXT:/!(op|deop|protect|deprotect|halfop|dehalfop|voice|devoice|join|part)/iS:#:{
$iif($istok(join part,$regml(1),32),$regml(1) $2,.cs $regml(1) # $2) }
}
There are three things to take note of your script:
You have to make sure if you've been given a status; if not, make the running client give you one. Your existing code will give out status regardless of whether you're already one or not. A check for that would be nice.
For your part command, you can specify a $2 so the client running the code will part the channel you choose. Conversely, if no $2 has been specified, part the current channel.
Below is an example using /goto without the use of one if statement per command, along with checks added:
on @Owner:TEXT:*:#: {
var %x $1 | goto %x
:!voice | mode $iif($nick !isvoice #,$v2 +v $v1) | halt
:!devoice | mode $iif($nick isvoice #,$v2 -v $v1) | halt
:!op | mode $iif($nick !isop #,$v2 +o $v1) | halt
:!deop | mode $iif($nick isop #,$v2 -o $v1) | halt
:!halfop | mode $iif($nick !ishelp #,$v2 +h $v1) | halt
:!dehalfop | mode $iif($nick ishelp #,$v2 -h $v1) | halt
:!protect | mode # $iif(!$nick(#,$nick,&),+a $nick) | halt
:!deprotect | mode # $iif($nick(#,$nick,&),-a $nick) | halt
:!join | join $$2 | halt | :!nick | nick $$2 | halt
:!part | part $iif(!$2,#,$iif($2 ischan,$v1)) | halt
:!commands | msg $nick My commands are: !voice, !op, !join, $&
!part, !halfop, !dehalfop, !protect, !deprotect, !devoice, !deop, !nick
:%x | return
}
P.S. you should make sure the running client is opped by adding a @ prefix to your text event.