Quick modes! (Updated)

By FRISH on Aug 06, 2007

This will set modes + or - q/a/o/h/v/b/I/e (or any other channel/nickmode) to any name/channel

You just put this code into your remotes section (Alt+R)

to use just type:
+vh partofname
-vh partofname
(you can replace vh with any channel or nickmode eg/ q, a, o, h, v, b, e and I, and/or combine modes like above)

so if FrIsH and GALVANISE are in the channel these will work:
+vh fri GALVANISE
+b-e FRI GALVANISE
-vh FrI GALVANISE
+ohv fRi
etc...
(you only need to enter part of their name)

(Any case now works eg/ "+v fRiS")

btw typing +i will set the channel +i (invite only)
typing +I name will set the name +i

obviously you have to at least have +h (%) to use these commands

Updates:
**Now can set modes of multiple people
Now works if:
if in the list there is:
@FRISH
%FRISHY
and ya type -o frish it will -@ FRISH (is case insensitive)
Now works with names with "[", "]" and
Every case is now accepted in names

Deleted unneeded variable
Made it so it works if you use colour codes etc in ur text
The text doesnt trigger if the first character isnt "+" or "-"
You can now set multiple modes on a nick now eg:
"+ov-bh fri"
Added the all lower case or upper case to be recognised (forgot that :$)
the if statement to be shorter.

note: that you have to combine on input codes, you cant have 2 "on :INPUT::{" in the same script ;)

Comments

Sign in to comment.
Korvin   -  Nov 23, 2007

this would be better if it included chan modes =/
Genxyuri, add halt right above the last }

 Respond  
Genxyuri   -  Nov 23, 2007

Damn srry for double posting.

 Respond  
Genxyuri   -  Nov 23, 2007

Why does it add what i typed 2 times..?

E.G.

+q Bobb
+q Bobb

  • Bobb sets mode: +q Bobb
 Respond  
Genxyuri   -  Nov 23, 2007

Why does it add what i typed 2 times..?

E.G.

+q Bobb
+q Bobb

  • Bobb sets mode: +q Bobb
 Respond  
guest598594   -  Sep 06, 2007

oh yea, true

 Respond  
FRISH   -  Sep 06, 2007

Indeed i could, but there would be no point xD since %qaohvopnix is always on the channel even if $2 is null ;)

 Respond  
guest598594   -  Sep 06, 2007

o yea, i totally forgot about ur not using full names :P

but then couldnt you do if (%qaohvopnix ison $chan) ?

 Respond  
FRISH   -  Sep 06, 2007

well ye but atm ya wudnt include the full name mostly (which is why i left the $2\'s out) and also i need to do a loop to check the placement of the k, check if its + or -, so i thought instead of wasting resorces on something ya jsut double click and enter a key ill prob leave it out. =/

 Respond  
guest598594   -  Sep 06, 2007

well you could get by the +k if you check if ($2 ison $chan) then do +k nick if ($2 !ison $chan) mode $chan +k $2

 Respond  
FRISH   -  Sep 06, 2007

;P i decided to actually do it xD and not be lazy :O,

anyway i know its not perfect (wont work with characters: [, ] or backslash
and it goes through the %qaohvopnix part even with channel modes
and mode +k dont work unless a name is the key
but ill try fix a couple of these if i can and have time

 Respond  
guest598594   -  Sep 06, 2007

yea thats a good idea :P

 Respond  
FRISH   -  Sep 06, 2007

xD np, ill try update my code sometime with regex so ya dont need to type in the whole name ;)

 Respond  
guest598594   -  Sep 05, 2007

damnit

on *:input:*:{
  if ($1 == - || $1 == +) && (!$3) {
    if ($mid($1,2,1) isin $nickmode && $2 ison $chan) $chan mode $chan $1-
    elseif ($mid($1,2,1) isin $chanmodes && $2 !ison $chan) mode $chan $1-2
  }
}

im rly sorry for all the silly mistakes :P

 Respond  
guest598594   -  Sep 05, 2007
on *:input:*:{
  if ($1 == - || $1 == +) {
    if ($mid($1,2,1) isin $nickmode && $2 ison $chan && !$3) $chan mode $chan $1-
    elseif ($mid($1,2,1) isin $chanmodes && $2 !ison $chan && !$4) mode $chan $1-2
  }
}

there we go

 Respond  
guest598594   -  Sep 05, 2007

shit nvm dont use that i totally forgot about channel modes...

 Respond  
guest598594   -  Sep 05, 2007

i agree it can be simplified a lot

on *:input:*:{
  if ($1 == - || $1 == +) && ($mid($1,2,1) isin $nickmode) && (!$3) {
    if ($2 ison $chan) {
      mode $chan $1-
    }
    else mode $chan $1
  }
}
 Respond  
guest598594   -  Sep 05, 2007

rather than using qaohvbeImCk use $nickmode

 Respond  
Lindrian   -  Sep 04, 2007

U can improve it... use variables to store the info, check for $modespl, and set separate lines if it exceeds etc...

 Respond  
FRISH   -  Aug 08, 2007

lol sorry guys about it not working, i made it only work if the name was lower case xD works now

 Respond  
FRISH   -  Aug 07, 2007

thanks for the hint ;), i was thinkin of using $regex aswell last night but would of still been longer lol.

 Respond  
Olliegod   -  Aug 07, 2007

You can shorten the if statement with regex. For example: if ($regex($1,/[-+][qaohvbeI]/S)) should do the same as your code.

 Respond  
FRISH   -  Aug 06, 2007

works perfectly fine for me =/ :S.

yeah and i couldnt find a way to shorten the if statement, ill try lookin another time.

 Respond  
Anti   -  Aug 06, 2007

Yes this clearly doesnt work Frish is right :INPUT:: also i really don\'t think you need so many || < when you delete thoughs it says */if: invalid format (line 2, script102.mrc)
:)
next time make it a little bit more neater.

 Respond  
FRISH   -  Aug 06, 2007

You not got another on :INPUT::{ command in the same script have you?

Another thing is that ya must have at least % on the channel, which im guessing you did.

Otherwise it could be that your irc server doesnt do /mode #channel +v etc =/?

 Respond  
NouMeRo   -  Aug 06, 2007

i\'m typing +v (the name) but nothing happens. y is this happening ?

 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.