I created the following file
[MOTDINFO]
MAXBANS=60
MAXCHANNELS=10
NICKLEN=30
TOPICLEN=307
KICKLEN=307

from this code:
RAW 005:* {
if (MAXBANS isin $1-) {
set %maxbans $matchtok($1- ,MAXBANS,1,32)
writeini SERVERSTAT.ini MOTDINFO MAXBANS $gettok(%maxbans,2,61)
}
if (MAXCHANNELS isin $1-) {
set %maxchannels $matchtok($1- ,MAXCHANNELS,1,32)
writeini SERVERSTAT.ini MOTDINFO MAXCHANNELS $gettok(%maxchannels,2,61)
}
if (NICKLEN isin $1-) {
set %nicklen $matchtok($1- ,NICKLEN,1,32)
writeini SERVERSTAT.ini MOTDINFO NICKLEN $gettok(%nicklen,2,61)
}
if (TOPICLEN isin $1-) {
set %topiclen $matchtok($1- ,TOPICLEN,1,32)
writeini SERVERSTAT.ini MOTDINFO TOPICLEN $gettok(%topiclen,2,61)
}
if (KICKLEN isin $1-) {
set %kicklen $matchtok($1- ,KICKLEN,1,32)
writeini SERVERSTAT.ini MOTDINFO KICKLEN $gettok(%kicklen,2,61)
}
}

to get the values back from the new INI file, use this style of call.
/echo -a $readini(SERVERSTAT.ini,MOTDINFO,MAXBANS)

I hope that helps you with your script.



Albert Ramnath
WinChat IIRC
http://routing.winchat.net