mIRC Home    About    Download    Register    News    Help

Print Thread
#145673 26/03/06 02:23 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
how comes that this dont work ?

Code:
#mlock on
on @*:MODE:#:{ 
  if ($nick == $me) {
    ;modes are saved
    set $+(%,mode.,$chan) $1-
  }
  elseif ($($+(%,mode.,$chan),2)) { 
    ;modes are restored
    /msg # you cant do that.
    !mode $chan $($+(%,mode.,$chan),2) 
  }
  else {
    ;no previous modes stored.
    !mode $chan +p
  }
} 
#mlock end

  


IceCapped
#145674 27/03/06 12:04 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Change this part
Code:
  set $+(%,mode.,$chan) $1- 


To

Code:
  set $+(%,mode.,$chan) $chan(#).mode 


So it saves the current channel modes.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#145675 27/03/06 01:50 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
still not working smirk

Last edited by raZOR; 27/03/06 01:56 PM.

IceCapped
#145676 27/03/06 02:29 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Are you opped on the channel?
Is there a preceding mode event in the same file?

~ Edit ~
Also, it seems to me that if you try to set modes that are
already set, they will be ignored. Maybe try clearing the
current channel modes first?

!mode $chan $+(-,$right($chan(#).mode,-1))
!mode $chan $($+(%,mode.,$chan),2)

Last edited by mIRCManiac; 27/03/06 02:44 PM.
#145677 27/03/06 02:59 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
nvm, my friend fixed it =)

(sorry for bugging)


IceCapped
#145678 27/03/06 03:01 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
So what was the problem then?


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#145679 27/03/06 03:06 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Quote:
So what was the problem then?


Yeah what was it? I hate that. lol

#145680 27/03/06 03:30 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
umm, my friend gave me different code

#mlock on
on @*:MODE:#:{ if ($nick != $me) {
if ($left($1,1) == +) { mode $chan - $+ $remove($1-,$left($1,1)) }
if ($left($1,1) == -) { mode $chan + $+ $remove($1-,$left($1,1)) }
}
}
#mlock end


IceCapped
#145681 27/03/06 05:09 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Ah, you just want to unset the mode set by other users. You should have specified that in your first post. wink


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard