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.
[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
}