Top

Quick modes! (Updated)


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  4.0
Scores Submitted  2
Date Added  Aug 06, 2007
Last Updated  Sep 22, 2007
Tags  a  admin  b  deop  deowner  e  h  halfop  i  mode  o  op  owner  q  quick  v  voice 
  Bookmark and Share

Introduction

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 <backslash>
*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 ;)

Grab the Code

Comments

  (25)  RSS
NouMeRo
Comments: 26
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 6, 2007 5:20 pm
i'm typing +v (the name) but nothing happens. y is this happening ?
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 6, 2007 5:55 pm
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 <name> etc =/?
Anti
Comments: 305
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 6, 2007 6:04 pm
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.
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 6, 2007 8:08 pm
works perfectly fine for me =/ :S.

yeah and i couldnt find a way to shorten the if statement, ill try lookin another time.
Olliegod
Comments: 74
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 7, 2007 12:45 am
You can shorten the if statement with regex. For example: if ($regex($1,/[-+][qaohvbeI]/S)) should do the same as your code.
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 7, 2007 6:17 am
thanks for the hint ;), i was thinkin of using $regex aswell last night but would of still been longer lol.
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Aug 8, 2007 4:19 pm
lol sorry guys about it not working, i made it only work if the name was lower case xD works now
Lindrian
Comments: 755
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 4, 2007 8:42 am
U can improve it... use variables to store the info, check for $modespl, and set separate lines if it exceeds etc...
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 5, 2007 7:23 pm
rather than using qaohvbeImCk use $nickmode
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 5, 2007 7:27 pm
i agree it can be simplified a lot

Code:

on *:input:*:{
  if ($1 == - || $1 == +) && ($mid($1,2,1) isin $nickmode) && (!$3) {
    if ($2 ison $chan) {
      mode $chan $1-
    }
    else mode $chan $1
  }
}
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 5, 2007 7:28 pm
shoot nvm dont use that i totally forgot about channel modes...
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 5, 2007 7:36 pm
Code:

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
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 5, 2007 7:38 pm
damnit

Code:

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
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 3:15 pm
xD np, ill try update my code sometime with regex so ya dont need to type in the whole name ;)
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 3:44 pm
yea thats a good idea :P
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 3:54 pm
;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
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 3:56 pm
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
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 4:18 pm
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. =/
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 4:22 pm
o yea, i totally forgot about ur not using full names :P

but then couldnt you do if (%qaohvopnix ison $chan) ?
FRISH
Comments: 63
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 4:43 pm
Indeed i could, but there would be no point xD since %qaohvopnix is always on the channel even if $2 is null ;)
mountaindew
Comments: 1,645
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Sep 6, 2007 4:46 pm
oh yea, true
Genxyuri
Comments: 19
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Nov 23, 2007 6:45 pm
Why does it add what i typed 2 times..?

E.G.

+q Bobb
+q Bobb
* Bobb sets mode: +q Bobb
Genxyuri
Comments: 19
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Nov 23, 2007 6:45 pm
Why does it add what i typed 2 times..?

E.G.

+q Bobb
+q Bobb
* Bobb sets mode: +q Bobb
Genxyuri
Comments: 19
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Nov 23, 2007 6:45 pm
Damn srry for double posting.
Korvin
Comments: 238
 
mIRC Snippet:  Quick modes! (Updated)
Posted on Nov 23, 2007 8:04 pm
this would be better if it included chan modes =/
Genxyuri, add halt right above the last }

Please Register or Login to start posting comments.
Bottom