mIRC Home    About    Download    Register    News    Help

Print Thread
#41654 13/08/03 09:12 PM
Joined: Feb 2003
Posts: 48
B
brad2 Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Feb 2003
Posts: 48
Code:
  

on *:CONNECT:{ 
  if (.server1.net isin $server) {  
    /command1
    /join -x #channel1
  }
  if (.server2.net isin $server) {
    /command1
    /join #channel2
  }
  if (.server3.net isin $server) {
    /command1
    /join #channel3
  }
  if (.server4.net isin $server) {
    /command2
  }
  else {
    /command3
  }
}



My problem is this: it runs the /command3 on EVERY server i connect to, even the ones i have listed as server1, server2, etc.

??

#41655 13/08/03 09:19 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well thats how else is supposed to work. It only applies to the if right above it. Try:

on *:CONNECT:{
if (.server1.net isin $server) {
/command1
/join -x #channel1
}
elseif (.server2.net isin $server) {
/command1
/join #channel2
}
elseif (.server3.net isin $server) {
/command1
/join #channel3
}
elseif (.server4.net isin $server) {
/command2
}
else {
/command3
}
}

#41656 14/08/03 05:01 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Codemastr dude, that doesn't work for me. frown
Sorry for spamming half servers.. grin
Try..
Code:
on *:CONNECT: {
  set %server $server
  if (ukchat.tiscali isin %server) { join #channel1 | command }
  elseif (irc.damaged isin %server) { join #channel2 | command }
  else { join #channel3 | command }
}

#41657 14/08/03 08:51 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
why set $server to %server will $server not work in your if statement? thats like one useless line of code isnt it?


D3m0nnet.com
#41658 14/08/03 08:57 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Useless maybe, bah maybe this then..
Code:
on *:CONNECT: {  
  if (ukchat.tiscali isin $server) { join #channel1 | command }  
  elseif (irc.damaged isin $server) { join #channel2 | command }  
  else { join #channel3 | command }
}


Link Copied to Clipboard