NOTE: This all works EXCEPT making the hash table on start. Run "/makelistservers" after the script loads to create the hash table.
_____________
Using mIRC.
Open mIRC and connect to the maxgaming irc server. If you don;t have miRC, get a custom version at:
http://www.mgonetwork.com/downloads2.php You want "MGOmIRC Version 2"
Create a file called fs2scraper.mrc in mgogames in your mirc install folder.
; Open a custom window called @IRC when mIRC starts
;on *:START: hmake FS2Games 50
on *:START: window @FS2ServerLog
;on *:START: clearlistservers
; If the user tries to close @IRC, open it again
; This is a kludge but unfortunately it's hard to come up with a better solution
on *:CLOSE:@FS2ServerLog: .timer 1 0 window @FS2ServerLog
; Since $network doesn't always return value, use $server for the network name if $network fails
alias -l networkname {
if ( $network ) return $network
return $server
}
alias listservers {
var %lcv
; declare the loop control variable as local, this will clean it up
; automatically when the alias is finished executing
%lcv = 1
; set the initial value of the lcv to 1, we start at the first nickname
echo @FS2ServerLog Host Nickname ---- Host IP Address
while (%lcv <= $hget(FS2Games,0).item) {
SET %HostNick $hget(FS2Games,%lcv).item
SET %HostIP $hget(FS2Games,%HostNick)
;echo @FS2ServerLog Host Nickname ---- Host IP Address
echo @FS2ServerLog %HostNick ---- %HostIP
; echo -a Nickname %lcv $+ : $nick(#, %lcv)
; we output the lcv'th nickname
inc %lcv
; we increment the lcv by one since so we can go to the next nickname
; since we have the condition to check the bounds of the lcv, once we have outputted
; the last nickname, the condition will become false and the loop will quit
}
; end the loop
}
alias clearlistservers {
hfree -s FS2games
hmake -s FS2Games 50
}
alias makelistservers {
hmake -s FS2Games 50
}
; Scan Channel messages
on *:TEXT:*FS2 Game started at IP*:#: {
SET %GameIP $6
; hmake FS2Games 50
hadd -s FS2Games $nick %GameIP
echo $color(normal text) -mlti2 @FS2ServerLog < $+ $networkname $+ : $+ $target $+ : $+ $nick $+ > $strip($1-,m)
echo @FS2ServerLog $hget(FS2Games,0).item Servers started since you logged on.
listservers
}
This scans the channels you are in for the text "FS2 Game started at IP" and takes the 6th word in that string (which will be the IP address right after the word IP, see below). and sets it to %GameIP.
It then writes the players IRC nickname and %GameIP to a local hash table.
It also creates the command "/listservers" that will echo the contents of your hash table, which is simply is a list of all servers your client is aware of since mIRC was started (obviously this isn't scalable).
You want to load this script by entering:
/reload -rs mgogames/fs2scraper.mrc
Now-
Hit alt-p after you launch mIRC
Go to View-->Nickname List
at the botom of the text field, add the following including the "-" :
-
Freespace 2 GamePlay
.Start Server List:{/makelistservers }
.Clear Serever List:{/clearlistservers }
.List Servers:{/listservers }
.Join Manually FS2:{/run c:\games\freespace2\fs2_open.exe -connect $$?=Enter IP| /msg $chan 4 $me, Joining a game of Freespace2 }
.Join Selected Nick FS2:{/run c:\games\freespace2\fs2_open.exe -connect $hget(FS2Games, $+ $1) }
.Host FS2 Game:{/run c:\games\freespace2\fs2_open.exe -startgame | /msg $chan FS2 Game started at IP $IP }
What that does:
Adds a menu item called gameplay when you right-click in the channel user list pane. In Gameplay, you have 2 options, join a game in progress or host a game. If you right click on a username who has just launched a game, it will pop a dialog for you to manually enter the IP address of the host.
It also adds a menu item that lets you join a game hosted by the selected user, so highlighting the uername in mIRC, what that does is go to the hash table we created above, lookup the IP associated with that nick, and launches the game with the -connect argument.
Obviously you need to edit the path to wherever fs2 is installed, need to add a reg entry for install directory, then I'll be able to read it.
Next stop, a GUI that lists all the games your mIRC client knows about

And managing the number of servers your client is aware of by age of the server
