Simple remote script

Platform:  mIRC
Published  Oct 12, 2009
Updated  Oct 12, 2009
Hey! This is my first script so I would like some feedback and constructive critisism on this.

Just place it in your remotes (Alt+R).

Hope you enjoy! on @*:text:!op*:#: {
if ($nick isop $chan) {
mode $chan +o $2
}
}

on @*:text:!deop*:#: {
if ($nick isop $chan) {
mode $chan -o $2
}
}

on @*:text:!halfop*:#: {
if ($nick isop $chan) {
mode $chan +h $2
}
}

on @*:text:!dehalfop*:#: {
if ($nick isop $chan) {
mode $chan -h $2
}
}

on @*:text:!voice*:#: {
if ($nick isop $chan) {
mode $chan +v $2
}
}

on @*:text:!devoice*:#: {
if ($nick isop $chan) {
mode $chan -v $2
}
}

on @*:text:!protect*:#: {
if ($nick isprotect $chan) {
mode $chan +ao $2
}
}

on @*:text:!deprotect*:#: {
if ($nick isprotect $chan) {
mode $chan -ao $2
}
}

on @*:text:!kick*:#: {
if ($nick isop $chan) {
mode $chan +k $2
}
}

on @*:text:!kickban*:#: {
if ($nick isop $chan) {
mode $chan +k +b $address($2,2)
}
}

on @*:text:!ban*:#: {
if ($nick isop $chan) {
mode $chan +b $address($2,2)
}
}

on @*:text:!unban*:#: {
if ($nick isop $chan) {
mode $chan -b $address($2,2)
}
}

Comments

Sign in to comment.
Jack-97   -  Oct 13, 2009
Thank you all for your critisism, I'll take all of the comment's in and use them to get better and learn new techniques of how to script.

Thanks again.
 Respond  
Testor   -  Oct 13, 2009
True.
 Respond  
sunslayer   -  Oct 12, 2009
@ testor his server may be using a diff IRCD and chmode k may be used to kick the person
 Respond  
Testor   -  Oct 12, 2009

Code

 

Should be Kick $Chan $nick $2-, as mode +k is for key.

Code

 

Modes with more than one 'Target' or w/e you wanna call them, eg +av, +ah, etc require more than one paremeter, so for +ao you'd need +ao $2 $2
 Respond  
Jethro   -  Oct 12, 2009
I know this script can even be improved a lot further by using one text event, instead of one per trigger. This is not the first time I've seen people use multiple text events, and surely it won't be the last.
 Respond  
Jack-97   -  Oct 12, 2009
Thanks sunslayer, I'll update now.
 Respond  
sunslayer   -  Oct 12, 2009
should prolly add what ircd this was made for
you can also make the code shorter by using the @%+ prefixes e.g.

Code

 
can be

Code

 
 Respond  
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.