mIRC Homepage
Posted By: xyzzy f key mods - 20/05/09 05:10 PM
how can i make f key works set/unset
F1 /mode #room +i for first F1 it will set +i
after then if i again try F1 it will set -i the room confused
Posted By: 5618 Re: f key mods - 20/05/09 05:15 PM
Code:
F1 /mode $chan $iif(i isincs $chan($chan).mode,-i,+i)
Posted By: xyzzy Re: f key mods - 20/05/09 05:30 PM
ty works well smile
i guess it works only when it see +i in the room modes
can we make that couple modes ?
like if there +i or +m ?
Posted By: 5618 Re: f key mods - 20/05/09 05:33 PM
You could make it set a couple modes, but you want to do both with only the F-key? And if so, how EXACTLY do you want it to behave?
Posted By: xyzzy Re: f key mods - 20/05/09 05:35 PM
yup its good setting couple modes
i meant this 'i isincs' if the room was +m it not works
so i need couple modes in there
Posted By: 5618 Re: f key mods - 20/05/09 05:49 PM
What? Please always explain problems clearly. Other people are not psychic. ;P
Posted By: xyzzy Re: f key mods - 20/05/09 05:52 PM
oh lol
ok ok lets try again
$iif(i isincs $chan($chan)
there is '(i' i hope u seen it lol
it means if the room got +i or -i mode
right ? i hope the answer is yes :P
ok now i mean i need there other modes
like +m so if the room got +/-i or +/-m
when i try f1 it will set modes end of the code which modes we put
i dunno another way to explain :P
Posted By: westor Re: f key mods - 20/05/09 05:55 PM
Put this code in the remotes ALT+R and try it:

Code:
alias F1 {
  if (($active == $chan) && ($me isop $chan)) {
    .var %chm = $chan($chan).mode
    if (!%F1) { .var %error $input(Please add your channel options e.g: /set $chr(37) $+ F1 ntrRmNli,houd,Error - F1) | .halt }
    if (%F1 isin %chm) {
      .mode $chan - $+ %f1
    }
    else { .mode $chan + $+ %f1 }
  }
  else { .var %error $input(Your target must be in a channel $+ $chr(44) and you must be a channel operator!,houd,Error - F1) }
}


ATTENTION: You can add modes just write /set %F1 im (m = moderate , i = invite only - you can add more without space!) , have fun!
© mIRC Discussion Forums