mIRC Home    About    Download    Register    News    Help

Print Thread
#5339 07/01/03 08:44 AM
Joined: Jan 2003
Posts: 6
N
Nozz Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Jan 2003
Posts: 6
Could we get a /server variable, so when you use it, mIRC will ignore perform..

Lets say when i connect to quakenet i have 5 channels in perform. Now what i wanna do is type like /server -m(the new variable) quakenet. When connectiong to quakenet i want to ignore the 5 channels thats in my perform

Thx for you help! Keep op the good work!

#5340 08/01/03 07:13 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Don't use the Perform section. Instead, put the commands in that section into an on *:CONNECT:{ remote script that first checks whatever your variable is and then issues the server command. You will need to alias out /server or use an on *:INPUT:*:{ to perform any other additional stuff (like setting variables) you wish to do prior to doing the /!server command. In the following example, if you type /server from any window, you will skip doing the Perform Section; if your script (or mIRC itself) uses /server the Perform Section will still be performed.

NOTE: You can still type /!server irc.somewhere.net to manually connect and still perform the commands in the Perform Section.
Code:

[color:#006600];  The commands from the Perform Section are added into this alias. Using an alias allows you to
;  re-perform all of the commands later in the same session, while still connected to the same server.
;  
;  This comes in handy if you have accidentally closed all your channel windows. Using /Perform.Section
;  will automatically rejoin all your default channels, as well as any other commands you have in there.
;[/color]
alias Perform.Section {
  [color:#006600];
  ;  Your Perform Section commands go in here.
  ;[/color]
  .raw JOIN #MyChannel1,#MyChannel2,#MyChannel3,#MyChannel4,#MyChannel5 key1,blankkey,blankkey,key4,key5
  .localinfo -u
  links
}
  
[color:#006600];  Don't do the perform section if we type the /server command from an editbox.
;[/color]
on *:INPUT:*:{
  if ((/server == $1) && (!$ctrlenter)) {
    set %_SkipPerform $true
    server $2-
    halt
  }
}
  
[color:#006600];  Run the "Perform Section" alias
;[/color]
on *:CONNECT:{
  if (!%_SkipPerform) Perform.Section
  set %_SkipPerform $false
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard