mIRC Homepage
Posted By: fallen248 Question concering != - 02/03/03 01:36 PM
OK, i want members to be able to msg a bot and have the bot tell the member the chankey, well i have this so far and it works however i need it to NOT ALLOW people who's userlever does not equal either 1, 2 , or 3. ..What do i have to do to make that part work?


on *:TEXT:!chankey*:?:{
if (%userlevel == 1) {
.notice $nick The Current Channel Key is %chankey
}
elseif (%userlevel == 2) {
.notice $nick The Current Channel Key is %chankey
}
elseif (%userlevel == 3) {
.notice $nick The Current Channel Key is %chankey
}
elseif (%userlevel != 1,2,3) {
.notice $nick You Do Not have correct access to this command
}}
Posted By: Watchdog Re: Question concering != - 02/03/03 03:13 PM
(%userlevel != 1 && %userlevel != 2 && %userlevel != 3) {
Posted By: theRat Re: Question concering != - 02/03/03 04:29 PM
Code:
on *:TEXT:!chankey*:?:{
  if (%userlevel isnum 1-3) {
    .notice $nick The Current Channel Key is %chankey
  }
  else {
    .notice $nick You Do Not have correct access to this command
  }
}


But where do you set the %userlevel variable???
Everytime %userlevel(which is variable, did you mean $userlevel identifier??) is 1, 2 or 3, anyone can send !chankey to bot and get the key...
© mIRC Discussion Forums