mIRC Home    About    Download    Register    News    Help

Print Thread
Auto Channel Modes! #247380 31/07/14 08:29 PM
Joined: Apr 2009
Posts: 34
K
KlasicKumputerz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Apr 2009
Posts: 34
I am looking for a script that will auto re set certain modes like to -m or -G or -U if the server sets them to +m or +G or +U. I want this to set -m, -G, -U automatically when the server does.


Computer expert of 32 years!
Re: Auto Channel Modes! [Re: KlasicKumputerz] #247383 31/07/14 09:08 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on @1:RAWMODE:#CHANNEL: {
  var %users $2-, %mode $1, %n $nick
  if (%n == $me) halt
  elseif (%n != ChanServ) notice %n You're not allowed to use the mode system.
  elseif (%n == ChanServ) && ($me isin %users) halt
  var %m $left(%mode,1)
  var %action $iif(%m == +,-,+)
  var %mode $replace(%mode,%m,%action)
  /mode # %mode $iif(%users,$v1,$null)
}
I'm using something similar.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Auto Channel Modes! [Re: Nillen] #247384 31/07/14 09:14 PM
Joined: Apr 2009
Posts: 34
K
KlasicKumputerz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Apr 2009
Posts: 34
This one is a little more complicated than I need. Plus I don't want it to send chanserv messages.


Computer expert of 32 years!
Re: Auto Channel Modes! [Re: KlasicKumputerz] #247385 31/07/14 09:27 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
Code:
on @*:rawmode:#channel:{ mode # -mGU }


/mode doesn't throw out an error message if the mode is already set / not set, so just unset the modes whenever the modes in the channel change.

No need for any complex checks or parsing of the modes.

Re: Auto Channel Modes! [Re: hixxy] #247386 31/07/14 09:29 PM
Joined: Apr 2009
Posts: 34
K
KlasicKumputerz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Apr 2009
Posts: 34
I'll give that a try and report back.


Computer expert of 32 years!
Re: Auto Channel Modes! [Re: KlasicKumputerz] #247389 31/07/14 10:23 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
My bad, I assumed that you wanted all modes to be reversed upon change.

Either way, it was primarily intended to become a template for you to use.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Auto Channel Modes! [Re: hixxy] #247512 05/08/14 11:28 PM
Joined: Apr 2009
Posts: 34
K
KlasicKumputerz Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Apr 2009
Posts: 34
This works perfect.




Originally Posted By: hixxy
Code:
on @*:rawmode:#channel:{ mode # -mGU }


/mode doesn't throw out an error message if the mode is already set / not set, so just unset the modes whenever the modes in the channel change.

No need for any complex checks or parsing of the modes.


Computer expert of 32 years!
Re: Auto Channel Modes! [Re: KlasicKumputerz] #247526 06/08/14 08:59 PM
Joined: Sep 2005
Posts: 2,878
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,878
Good stuff smile