mIRC Home    About    Download    Register    News    Help

Print Thread
J
jeppelykke
jeppelykke
J
Hey Hey smile

Hope you guys can help, i'm working on a login script for a system and what i need is that in the popup menu for channel have a Login or logout depending if you logged in to the system.

Code:
  menu channel {
  $iif($chan == #GameHotel ,GH $+ $chr(58) Vagt Logon):{ .set %gh.vagt yes | commands here }
  $iif($chan == #GameHotel ,GH $+ $chr(58) Vagt Logoff):{ .set %gh.vagt yes | commands here }
}

What i need is it also checks for what state %gh.vagt is in, if its YES then the options in menu channel should be logoff and if no it should be logon

Hope you have sugguestions ...

Joined: Apr 2004
Posts: 755
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 755
Code:
Menu channel { 
  $iif($chan == #GameHotel && %gh.vagt == YES,GH $+ $chr(58) Vagt Logoff,GH $+ $chr(58) Vagt Logon): { 
    if (%gh.vagt == yes) { 
      echo -a logoff commands here 
      unset %gh.vagt
      halt
    }
    else { 
      echo -a logon commands here
      set %gh.vagt yes
    } 
  }
}

Last edited by Mpdreamz; 29/03/05 04:12 PM.
J
jeppelykke
jeppelykke
J
Thanx mate smile)

Keep up the good work..

J
jeppelykke
jeppelykke
J
OK, found a problem

hehe, when the channel is not #gamehotel then it also shows the logon in other channel, where i want it not to show when i rightclick on another channel

D
DaveC
DaveC
D
Code:
Menu channel { 
  $iif($chan == #GameHotel,$iif(%gh.vagt == YES,GH $+ $chr(58) Vagt Logoff,GH $+ $chr(58) Vagt Logon)) : { 
    if (%gh.vagt == yes) { 
      echo -a logoff commands here 
      unset %gh.vagt
    }
    else { 
      echo -a logon commands here
      set %gh.vagt yes
    } 
  }
}

J
jeppelykke
jeppelykke
J
Thanx so much....!!!! grin grin grin laugh laugh laugh


Link Copied to Clipboard