Chatspace commands (Uses SERVICES)

By KittenAdamas on Aug 17, 2011

Just a quick simple snippet I made for use with chatspace servers.

Features:
Give/Take permanent or temp admin (for server admins)
Register/Delete channels (for server admins)

Register/Delete/Ghost Nickname (for users) (other is for admins)

Add/Delete SOP, AOP, VOP and OTHER (For SOP channel owners)

Sidenote: When commands are prompted, it will message the user e.g .-:|[ Nick you are now a room moderator in #Room ]|:-.

Note:
Obviously for MOST of the commands you need to be SOP or higher

I know there's a lot of extended menus but I found when I grouped them all together (eg Add/delete all in the same menu it became easy to accidently click the wrong options.

menu channel {
  Admin Controls
  .Admin
  ..Give Admin (Perm):GPA $$?="Enter Nick:"
  ..Take Admin (Perm):TPA $$?="Enter Nick:"
  ..-
  ..Give Admin (Temp):GTA $$?="Enter Nick:"
  ..Take Admin (Temp):TTA $$?="Enter Nick:"
  ..-
  ..Kill Nick:KLNK $$?="Enter Nick:" $$?="Enter Reason:"
  .Nick Control
  ..Register Nick:RN $$?="Enter Nick:" $$?="Set Password:"
  ..-
  ..Delete Nick:DN $$?="Enter Nick:"
  ..-
  ..Ghost Nick:GN $$?="Enter Nick:"
  ..Reset Nick:RSTN $$?="Enter Nick:"
  .Room Control
  ..Add/Delete Rooms
  ...Register $chan:RC
  ...Register Room (Other):ROC $$?="Enter Roomname:"
  ...-
  ...Delete $chan:DC
  ...Delete Room (Other):DOC $$?="Enter Roomname:"
  ..Owner/Mod
  ...Owner
  ....Add Owner $chan:AO $$?"Enter Nick:"
  ....Add Owner (Other):AOO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Owner $chan:DO $$?"Enter Nick:"
  ....Del Owner (Other):DOO $$?"Enter Room:" $$?"Enter Nick:"
  ...Mod
  ....Add Mod $chan:AMD $$?"Enter Nick:"
  ....Add Mod (Other):AMDO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Mod $chan:DM $$?"Enter Nick:"
  ....Del Mod (Other):DMO $$?"Enter Room:" $$?"Enter Nick:"
  ...Voice
  ....Add Voice $chan:ADV $$?"Enter Nick:"
  ....Add Voice (Other):ADVO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Voice $chan:DLV $$?"Enter Nick:"
  ....Del Voice (Other):DLVO $$?"Enter Room:" $$?"Enter Nick:"
}

menu status {
  Admin Controls
  .Give/Take Admin
  ..Give Admin (Perm):GPA $$?="Enter Nick:"
  ..Take Admin (Perm):TPA $$?="Enter Nick:"
  ..-
  ..Give Admin (Temp):GTA $$?="Enter Nick:"
  ..Take Admin (Temp):TTA $$?="Enter Nick:"
  ..-
  ..Kill Nick:KLNK $$?="Enter Nick:" $$?="Enter Reason:"
  .Nick Control
  ..Register Nick:RN $$?="Enter Nick:" $$?="Set Password:"
  ..-
  ..Delete Nick:DN $$?="Enter Nick:"
  ..-
  ..Ghost Nick:GN $$?="Enter Nick:"
  ..Reset Nick:RSTN $$?="Enter Nick:"
  .Room Control
  ..Add/Delete Rooms
  ...Register Room (Other):ROC $$?="Enter Roomname:"
  ...-
  ...Delete Room (Other):DOC $$?="Enter Roomname:"
  ..Owner/Mod
  ...Owner
  ....Add Owner (Other):AOO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Owner (Other):DOO $$?"Enter Room:" $$?"Enter Nick:"
  ...Mod
  ....Add Mod (Other):AMDO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Mod (Other):DMO $$?"Enter Room:" $$?"Enter Nick:"
  ...Voice
  ....Add Voice (Other):ADVO $$?"Enter Room:" $$?"Enter Nick:"
  ....-
  ....Del Voice (Other):DLVO $$?"Enter Room:" $$?"Enter Nick:"
}

menu nicklist {
  Admin Controls
  .Admin
  ..Give Admin (Perm):GPA $$1
  ..Take Admin (Perm):TPA $$1
  ..-
  ..Give Admin (Temp):GTA $$1
  ..Take Admin (Temp):TTA $$1
  ..-
  ..Kill $nick:KLNK $$1 $$?="Enter Reason:"
  .Nick Control
  ..Register Nick:RN $$?="Enter Nick:" $$?="Set Password:"
  ..-
  ..-Delete Nick:DN $$?="Enter Nick:"
  ..-
  ..Ghost $$1:GN $$1
  ..Reset $$1:RSTN $$1
  .Room Control
  ..Add/Delete Rooms
  ...Register $chan:RC
  ...Register Room (Other):ROC $$?="Enter Roomname:"
  ...-
  ...Delete $chan:DC
  ...Delete Room (Other):DOC $$?="Enter Roomname:"
  ..Owner/Mod
  ...Owner
  ....Add Owner $chan:AO $$1
  ....Add Owner (Other):AOO $$?"Enter Room:" $$1
  ....-
  ....Del Owner $chan:DO $$1
  ....Del Owner (Other):DOO $$?"Enter Room:" $$1
  ...Mod
  ....Add Mod $chan:AMD $$1
  ....Add Mod (Other):AMDO $$?"Enter Room:" $$1
  ....-
  ....Del Mod $chan:DM $$1
  ....Del Mod (Other):DMO $$?"Enter Room:" $$1
  ...Voice
  ....Add Voice $chan:ADV $$1
  ....Add Voice (Other):ADVO $$?"Enter Room:" $$1
  ....-
  ....Del Voice $chan:DLV $$1
  ....Del Voice (Other):DLVO $$?"Enter Room:" $$1
}

alias GPA {
  Services set $$1 admin on
  .notice $$1 14.7-14:7|14[ $$1 You are now a 7permanent14 server administrator ]7|14:7-14.
}

alias TPA {
  Services set $$1 admin off
  .notice $$1 14.7-14:7|14[ $$1 You are no longer a 7permanent14 server administrator ]7|14:7-14.
} 

alias GTA {
  setoper $$1 +admin
  .notice $$1 14.7-14:7|14[ $$1 You are now a 7temporary14 server administrator ]7|14:7-14.
}

alias TTA {
  setoper $$1  -admin
  .notice $$1 14.7-14:7|14[ $$1 You are no longer a 7temporary14 server administrator ]7|14:7-14.
} 

alias RN {
  services register $$1 $$2
  amsg 14.7-14:7|14[ $me registered the nick7 $$1 14]7|14:7-14.
}

alias DN {
  services drop $$1
  amsg 14.7-14:7|14[ $me dropped the nick7 $$1 14]7|14:7-14.
}

alias GN {
  services ghost $$1
}

alias RSTN {
  services reset $$1
}

alias RC {
  services register $chan
  amsg 14.7-14:7|14[ $me registered the room7 $$1 14]7|14:7-14.
}

alias ROC {
  services register $iif($left($1,1) == #,$1,#$1)
  amsg 14.7-14:7|14[ $me registered the room7 $iif($left($1,1) == #,$1,#$1) 14]7|14:7-14.
}

alias DC {
  services drop $chan
  amsg 14.7-14:7|14[ $me registered the room7 $$1 14]7|14:7-14.
}

alias DOC {
  services drop $iif($left($1,1) == #,$1,#$1)
  amsg 14.7-14:7|14[ $me registered the room7 $iif($left($1,1) == #,$1,#$1) 14]7|14:7-14.
}

alias AO {
  Services SOP $chan ADD $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14w a ro7o14m 7o14w7n14e7r in14 $chan ]7|14:7-14.
}

alias AOO {
  Services SOP $iif($left($1,1) == #,$1,#$1) ADD $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14w a ro7o14m 7o14w7n14e7r in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias DO {
  Services SOP $chan DEL $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14 l7o14ng7e14r a ro7o14m 7o14w7n14e7r in14 $chan ]7|14:7-14.
}

alias DOO {
  Services SOP $iif($left($1,1) == #,$1,#$1) DEL $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14 l7o14ng7e14r a ro7o14m 7o14w7n14e7r in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias AMD {
  Services AOP $chan ADD $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14w a ro7o14m 7m14o7d14e7r14a7t14o7r14 in14 $chan ]7|14:7-14.
}

alias AMDO {
  Services AOP $iif($left($1,1) == #,$1,#$1) ADD $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14w a ro7o14m 7m14o7d14e7r14a7t14o7r14 in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias DM {
  Services AOP $chan DEL $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14 l7o14ng7e14r a ro7o14m 7m14o7d14e7r14a7t14o7r14 in14 $chan ]7|14:7-14.
}

alias DMO {
  Services AOP $iif($left($1,1) == #,$1,#$1) DEL $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14 l7o14ng7e14r a ro7o14m 7m14o7d14e7r14a7t14o7r14 in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias ADV {
  Services VOP $chan ADD $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14w a V7O14P in14 $chan ]7|14:7-14.
}

alias ADVO {
  Services VOP $iif($left($1,1) == #,$1,#$1) ADD $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14w a V7O14P in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias DLV {
  Services VOP $chan DEL $$1
  .notice $$1 14.7-14:7|14[7 $$1 14you 7a14re n7o14 l7o14ng7e14r a V7O14P in14 $chan ]7|14:7-14.
}

alias DLVO {
  Services VOP $iif($left($1,1) == #,$1,#$1) DEL $$2
  .notice $$2 14.7-14:7|14[7 $$2 14you 7a14re n7o14 l7o14ng7e14r a V7O14P in14 $iif($left($1,1) == #,$1,#$1) ]7|14:7-14.
}

alias KLNK {
  kill $$1 14.7-14:7|14[7 $$2 14]7|14:7-14.

Comments

Sign in to comment.
blackvenomm666   -  Aug 21, 2011

i've hosted like 5 chat servers. all chatspace. the ones i have hosted myself i never had any problems. but ones i had other people hosting for me or i have adminned on i've seen a lot of crap happen. i do understand though if your having someone else hosting and they either A. don't wanna do olines for you or B. you don't wanna deal with them. but if thats the case make a bot that stores oline pw's for your admins and when they sign on they message the bot saying .admin pwhere or something. and have the bot check their ip to make sure it is who they are supposed to be then the bot can admin them. its not the best way to do things but better than doing profile admin.

 Respond  
yelow79   -  Aug 21, 2011

It's best to have login and password for everything possible.
there is always someone trying to take over. even with precautions it can be difficult to keep them out.

 Respond  
blackvenomm666   -  Aug 21, 2011

with chatspace you can give a person admin via their profile. so as soon as they login they have admin. but its not a good idea seeing how services is easily hacked and people can get other peoples nick pw's that way. it is always best to have the oline passwords instead of just admin via profile

 Respond  
yelow79   -  Aug 21, 2011

I thought the same thing about not having passwords but didn't say anything as I am not familiar with the services this is for.

 Respond  
blackvenomm666   -  Aug 21, 2011

thats not even really a released code atm. thats the first time i've posted it anywhere. there are other aliases missing as well

 Respond  
Jethro   -  Aug 21, 2011

Where are the mass commands, Venom?

 Respond  
blackvenomm666   -  Aug 21, 2011

kittenadamas one major thing in this script which is a FAIL thing to do i mean its nice to know the command but its a total fail and noob command to use

..Give Admin (Perm):GPA $$1
  ..Take Admin (Perm):TPA $$1

never ever ever ever EVER give a person perm admin this way. giving someone perm admin via the profile instead of using an oline pw is the worse thing to do. never give operator status this way either. it is the fasted way to have your server or the server your adminning on w.e taken over. someone hacks the services and gets the persons nick pw your screwed
also for your registering and dropping of nicks. i would add the changing of password command .services set $me pass $$?="Enter A Pass"
and for these here
..Register Nick:RN $$?="Enter Nick:" $$?="Set Password:"
..-
..Delete Nick:DN $$?="Enter Nick:"
you could just use .services register $me $$?="Set Password:"
and .services drop $me. seeing how unless you are admin you must be on the nickname to register it.
and no offense but im not seeing a reason to make aliases for all these

mine is a bit more complicated and do require some aliases

Ctcp Commands
.version $1 : { .ctcp $1 version }
.ping $1 : { .ctcp $1 ping }
.time $1 : { .ctcp $1 time }
.finger $1 : { .ctcp $1 finger }
General User Commands
.RegNick: { 
  if (!$network) {
    .services register $me $$?="Enter A Pass"
  }
  else { .msg nickserv register $$?="Enter A password" $$?="Enter a valid email"  
  }
}
.UnRegNick: { 
  if (!$network) {
    .services drop $me 
  }
  else { .msg nickserv drop $me $$?="Enter your password"  
  }
}
.Change Pass { 
  if (!$network) {
    .services set $me pass $$?="Enter A Pass" 
  }
  else { .msg nickserv set password $$?="Enter a new password"  
  }
}
.Ignore $1 : { .ignore $address($1,4) }
.Unignore $1 : { .ignore -r $address($1,4) }
.Whois $1 : { .whois $1 }
.Admin Stats : { .stats o }
.CheckAvailableAdmins: { checkadmin }
$iif($isServerAdmin($1), Chatspace Mod Commands,$iif($me isop $chan, Chatspace Mod Commands))
.Op $1: { mode $active +o $1 }
.DeOp $1: { mode $active -o $1 }
.Voice $1: { mode $active +v $1 }
.DeVoice $1: { mode $active -v $1 }
.Kick $1: { mode $active -o $1 | kick $active $1 }
.KickReason $1: { mode $active -o $1 | kick $active $1 $$?="why are you kicking them" }
.Quiet $1: { .mode $active +q $address($1, 4) }
.DeQuiet $1: { .mode $active -q $address($1, 4) }
.ManualUnQuiet: { .mode $active -q $$?="Enter A Nick Or Ip To Unquiet" }
.Ban $1: { mode $active -o $1 | ban -k $active $address($1, 4) | kick $active $1 }
.BanReason $1: { mode $active -o $1 | ban -k $active $address($1, 4) | kick $active $1 $$?="why are you banning them" }
.TimeBan $1: { mode $active -o $1 | ban -ku $+ $calc($+($$?"How many minutes? ex 5 6 7 8") * 60) $active $address($1, 4) | kick $active $1 }
.TimeBanReason $1: { mode $active -o $1 | ban -ku $+ $calc($+($$?"How many minutes? ex 5 6 7 8") * 60) $active $address($1, 4) | kick $active $1 $$?="why are you banning them" }
.UnBan: { mode $active -b $$?="Enter A Nick Or Ip To Unban" }
.ViewQuiets: { checkquiets | .mode $chan +q }
.ViewBans: { .set %checkbanchan $chan | checkbans | bansors }
$iif($isServerAdmin($1), ChatSpace Owner Commands,$iif($me isop $chan, ChatSpace Owner Commands))
.AddSop $1: { services Sop $active add $1 | mode $active +o $1 }
.DelSop $1: { services Sop $active del $1 | mode $active -o $1 }
.AddMod $1: { services Aop $active add $1 | mode $active +o $1 }
.DelMod $1: { services Aop $active del $1 | mode $active -o $1 }
.AddVop $1: { services Vop $active add $1 | mode $active +v $1 }
.DelVop $1: { services Vop $active del $1 | mode $active -v $1 }
.AddMem $1: { services Mem $active add $1 }
.DelMem $1: { services Mem $active del $1 }
.SopPass: { set $active SopPass $$?="Enter A Pass" }
.AopPass: { set $active AopPass $$?="Enter A Pass" }
.ViewAopList: { if (!$dialog(Roomsettings.System)) { .services info $active } } 
$iif($isServerAdmin($1), Mass Commands,$iif($me isop $chan, Mass Commands))
.MassOp: { massop }
.MassDeop: { massdeop }
.MassKick: { masskick }
.MassBan: { massban }
.Massvoice: { massvoice }
.MassDeVoice: { massdevoice }
.MassKill: { masskill }
$iif($isServerAdmin($1), Chatspace Admin/Oper Commands)
.Cloak: { mode $me +j }
.Decloak: { mode $me -j }
.Kill $1: { .kill $1 }
.KillReason $1: { .kill $1 $$?="Reason For The Kill" }
.Kline $1: { .kline $address($1, 4) }
.KlineReason $1: { .kline $address($1, 4) $$?="Reason For The Kline" }
.KlineList: { checkklines | .stats k }
.Akill $1: { .akill $address($1, 4) }
.AkillReason $1: { .akill $address($1, 4) $$?="Reason For The Akill" }
.AkillList: { checkklines | .stats k }
.Shun $1: { shun $address($1, 4) }
.Unshun $1: { shun - $address($1, 4) }
.Shunlist: { checkshuns }
.Admin $1: { .setoper $1 +admin }
.DeAdmin $1: { .setoper $1 -admin }
.Oper $1: { .setoper $1 +oper }
.DeOper $1: { .setoper $1 -oper }
 Respond  
Jethro   -  Aug 20, 2011

This should have used the echo to print out info, since they are all aliases. I don't see the usefulness in having other people to see who has registered and whatnot.

 Respond  
yelow79   -  Aug 20, 2011

Python where it says amsg change that to "echo -a" without the "

 Respond  
PyThOn   -  Aug 17, 2011

But insted of having it msg the chan change it to notice the person who does it, so it doesnt create a spam or flood w/e u wanna call it

 Respond  
PyThOn   -  Aug 17, 2011

<+PyServ> .-:|[ PyServ registered the room #Test321 ]|:-.

Works good for me.
Well done.

 Respond  
Dani_l11   -  Aug 17, 2011

No need to amsg everything you do, plus this will only work for the server you made it for. Other servers have different commands.

 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.