mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
I want this script to don't work in a certain channel, How
do I make that happen? Thanks!

Code:
on *:TEXT: *:#: {
  if ($me !isop $chan) { 
    .msg $chan I'm Still not an operator. Go to #Bux for requesting again.
    .timer 1 30 .part $chan I'm Still not an operator. Go to #Bux for requesting again.
  } 
}

Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
I came up with this after thinking for 5 minutes and it works but I'm sure there are an easier way, I don't want to trouble myself more.

Code:
on *:TEXT: *:#: {
  if ($chan == #hakd) {
    halt
  }
  else { 
    if ($me !isop $chan) { 
      .msg $chan I'm Still not an operator. Go to #Bux for requesting again.
      .timer 1 30 .part $chan I'm Still not an operator. Go to #Bux for requesting again.
    } 
  }
}

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
For a single channel:

Code:
on *:TEXT: *:#: {
  if ($chan == #banchan) halt

  if ($me !isop $chan) { 
    .msg $chan I'm Still not an operator. Go to #Bux for requesting again.
    .timer 1 30 .part $chan I'm Still not an operator. Go to #Bux for requesting again.
  } 
}


For multiple channels use $istok, same as your other question:

Code:
on *:TEXT: *:#: {
  ; banned channel list
  if ($istok(#chan1 #chan2 #chanx,$chan,32)) halt

  if ($me !isop $chan) { 
    .msg $chan I'm Still not an operator. Go to #Bux for requesting again.
    .timer 1 30 .part $chan I'm Still not an operator. Go to #Bux for requesting again.
  } 
}

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Ha! I left this tab open for a while doing something else then typed my answer. Just seen you worked it out already. You did come up with the easiest way. Just need to mod your code a bit as the else section is redundant.

Last edited by ruprecht; 07/11/16 10:56 AM.
Joined: Nov 2013
Posts: 11
B
BuxXray Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Nov 2013
Posts: 11
Thanks!


Link Copied to Clipboard