Multi inputs for Chatspace and Ircd

By Sharky_Dude on May 02, 2011

okay so This is my input system made to work on both chatspace systems and ircd. Before you inform me I use this snippet and I know you will get a msg unknown command if you use perm inputs becasue they are duel inputs, so they will work fine. They get the job done and you don't have to remember alot more that just simple inputs. The point of this is these inputs will get you what you are alowed to do on most servers, and yes a couple of them you must be admin to use.

+o targetnick Temp mod
-o targetnick Take temp mod
+a targetnick Tem Room Admins (Ircd only)
-a targetnick Takes Temp Room admin (Ircd only)
+h targetnick Temp half mod (Ircd only)
-h targetnick Takes Temp half mod (Ircd only)
+v targetnick Temp voices
-v targetnick Takes Temp voice
+q targetnick (Chatspace quiets a nickname and it's IP) (On Ircd for Admin gives Temp founder rights)
-q targetnick Removes +q
~q targetnick Quiets nick on Ircd
~uq targetnick Unquiets nick on ircd
+b targetnick Bans a chatter without kicking him
+nb targetnick Bans a Chatters nickname, kicks him and tells him to change his nickname
-b targetnick unbans anyone
+t add channel topic here
+i targetnick invites a person to the channel you type this in
+sop targetnick Gives someone perm owner
-sop targetnick Takes owner from someone
+aop targetnick Gives perm mod
-aop targetnick Takes perm mod
+hop targetnick Ircd only gives perm half mod
-hop targetnick Ircd only takes perm half mod
+vop targetnick Gives perm voice
-vop targetnick Takes perm voice
+vo targetnick Gives voice and takes mod
+ov targetnick Gives mod and takes voice
+f targetnick Ircd Admin only Forces a chatter into a the room you type it into
+p targetnick Ircd Admin only Force-ably parts a chatter in the room you type it into

*** Fixed sop bug

Updated again

Fixed ~q and ~uq
added:
+nick Ircd Root admin only, this changes the person's nickname to what you want.
+founder ircd admin Makes the founder of the room you are in who you want it to be, but careful, there can be only one real founder.
+ad Admin, gives basic admin
-ad Admin, takes admin from a person
+mm Mods, this quickly sets flood protection
-mm Mods, this quickly unsets flood protection

I also made it so you can mass temp founder, room admin, op, half op, and voice, and take it all back ie
+o Jonny Bill Tom Jay Ben George
and
-o Jonny Bill Tom Jay Ben George
also the kicks and bans now demod and all before it kicks so you can kick owners.

on *:Input:#:{
  If ($$1 == +o) { Mode # +oooooooooooooooooooooooooo $2- }
  If ($$1 == -o) { Mode # -oooooooooooooooooooooooooo $2- }
  ;
  If ($$1 == +a) { Mode # +aaaaaaaaaaaaaaaaaaaaaaaaaa $2- }
  If ($$1 == -a) { Mode # -aaaaaaaaaaaaaaaaaaaaaaaaaa $2- }
  ;
  If ($$1 == +h) { Mode # +hhhhhhhhhhhhhhhhhhhhhhhhhh $2- }
  If ($$1 == -h) { Mode # -hhhhhhhhhhhhhhhhhhhhhhhhhh $2- }
  ;
  If ($$1 == +v) { Mode # +vvvvvvvvvvvvvvvvvvvvvvvvvv $2- }
  If ($$1 == -v) { Mode # -vvvvvvvvvvvvvvvvvvvvvvvvvv $2- }
  ;
  If ($$1 == +q) { Mode # +q $Address($2,4) | mode # +qqqqqqqqqqqqqqqqqqqqqqqqqq $2- }
  If ($$1 == -q) { Mode # -q $Address($2,4) | mode # -qqqqqqqqqqqqqqqqqqqqqqqqqq $2- }
  If ($$1 == ~q) { mode # +b $Address($2,4) ~q:nick }
  If ($$1 == ~uq) { mode # -b $Address($2,4) ~q:nick }
  ;
  If ($$1 == +b) { mode # -qaohv $2 $2 $2 $2 $2 | Ban # $Address($2,4) }
  If ($$1 == +nb) { mode # -qaohv $2 $2 $2 $2 $2 | Mode # +b $2 | Kick # $2 Change your name please. }
  If ($$1 == -b) { Mode # -b $Address($2,4) | Mode # -b $2 }
  ;
  If ($$1 == +k) { mode # -qaohv $2 $2 $2 $2 $2 | Kick # $2 $3- }
  If ($$1 == +kb) { mode # -qaohv $2 $2 $2 $2 $2 | Kick # $2 $3- | Ban # $address($2,4) }
  If ($$1 == +ab) { mode # -qaohv $2 $2 $2 $2 $2 | Kick # $2 $3- you are not the proper age for this room. | Ban # $address($2,4) | ban # $2 }
  ;
  If ($$1 == +t) { Topic # $2- }
  If ($$1 == +i) { Invite $2 # }
  ;
  If ($$1 == +founder) { .cs set # founder $2 }
  ;
  If ($$1 == +sop) { Services Sop # Add $2 }
  If ($$1 == +sop) { .cs sop # add $2 }
  If ($$1 == -sop) { Services Sop # Del $2 }
  If ($$1 == -sop) { .cs sop # Del $2 }

  ;
  If ($$1 == +aop) { Services Aop # Add $2 | mode # +o $2 }
  If ($$1 == +aop) { .cs aop # add $2 }
  If ($$1 == -aop) { Services Aop # Del $2 }
  If ($$1 == -aop) { .cs aop # del $2 }
  ;
  If ($$1 == +hop) { .cs hop # add $2 }
  If ($$1 == -hop) { .cs hop # Del $2 }
  ;
  If ($$1 == +vop) { Services Vop # Add $2 | mode # +v $2 }
  If ($$1 == +vop) { .cs vop # add $2 }
  If ($$1 == -vop) { Services Vop # Del $2 }
  If ($$1 == -vop) { .cs vop # del $2 }
  ;
  if ($$1 == +vo) { mode # -o+v $2 $2 }
  if ($$1 == +ov) { mode # -v+o $2 $2 }
  ;
  If ($$1 == +f) { .sajoin $2 # }
  If ($$1 == +p) { .sapart $2 # }
  ;
  If ($$1 == +nick) { .os svsnick $2 $3- }
  if ($1 == +ad) { .setoper $2 +admin }
  if ($1 == -ad) { .setoper $2 -a }
  ;
  if ($1 == +mm) { mode # +m | .notice $me ***Only Mods (+h and up) may speak in this channel*** }
  if ($1 == -mm) { mode # -m | .notice $me *Channel set normal, All users may speak in this channel* }
}

Comments

Sign in to comment.
Lucius   -  May 09, 2011

well every chatspace server I've seen has th word chatspace on the server window when you connect.
So maybe set a %servcheck. [ $+ [ $server ] ] chatspace when you recieve the connection info?
something like

 raw 002:*:{
if (chatspace isin $2-) { set %servcheck. [ $+ [ $server ] ] chatspace }
else { set %servcheck. [ $+ [ $server ] ] ircd }
} 

I'm more of a fun coder than server coder, but I think that should work.
Good luck with it & I like that it works on both, if you can get an autocheck working then I'll definitely be using it.
7/10 (as yet)

 Respond  
Epic   -  May 02, 2011

well if they know what network they on just like if ($network == networkhere) for ircd or something, idk exactly howd tht go, would be interesting to see done imo :p

 Respond  
Sharky_Dude   -  May 02, 2011

Ya but how do I make it look at if it's ircd and do so in the input channel, that's the thing I'm trying to overcome. And ya I know some don't mind but I Code sometimes just to do it. xD

 Respond  
Epic   -  May 02, 2011

ever think about adding a if !$server == w.e or some sort of halt for 1 if its on ircd network and likewise for otherway? would help get rid of the unknown command stuff, but i think itd be effort and some dont mind a unknown alias/command sometimes

 Respond  
Sharky_Dude   -  May 02, 2011

Well when I started I did have the ircd specific set to ~aop ~unaop and what not, I kept using chatspace style +aop I used to have this as a single command line:

If ($$1 == +sop) { Services Sop # Add $2 | /cs aop # add $2 }

But I figured for newbies I broke it down so they can edit it easier if they want to and I just found it easier for me too sometimes cause my likes change and I sometimes like to add notices to some servers like the one I own, but not chatspace.
I know I can make this smaller. but I'm actually thinking of trying to make a way so that the inputs know what kind of server it's on and use the appropriate command line and not both. If I do, I will post that too.

 Respond  
Epic   -  May 02, 2011

hey for the ircd i think for some of the /mode #channel you could just use


 if ($left($1, 1) isin +-) {
    haltdef
    mode $chan $eval($1-,2) $iif($2,$2-,$me)
  }

But im not sure exactly if itd be a pain to edit/ if itd interfere with other portions of your script, and could i suggest some regex or some otherform of code to stop some repitition? otherwise i like the variety of what you can do in the 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.