mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Apr 2003
Posts: 14
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 ...




Best Regards
Jeppe Lykke, Denmark
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
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.

$maybe
Joined: Apr 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Apr 2003
Posts: 14
Thanx mate smile)

Keep up the good work..




Best Regards
Jeppe Lykke, Denmark
Joined: Apr 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Apr 2003
Posts: 14
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




Best Regards
Jeppe Lykke, Denmark
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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
    } 
  }
}

Joined: Apr 2003
Posts: 14
J
Pikka bird
OP Offline
Pikka bird
J
Joined: Apr 2003
Posts: 14
Thanx so much....!!!! grin grin grin laugh laugh laugh




Best Regards
Jeppe Lykke, Denmark

Link Copied to Clipboard