mIRC Homepage
Posted By: OsTrailYa Re: MOTD Script - 06/10/05 03:12 PM
Hey,

was wondering if someone can help me with a MOTD script that will display the MOTD into @MOTD_ $network


thanks in advanced
Posted By: MikeChat Re: MOTD Script - 06/10/05 03:53 PM
using this to get the numberic raw codes
#showraw off
raw *:*:echo 4 -a $numeric $2-
#showraw end

type /enable #showraw

on DAL.net the /motd command returns this:

375 - broadway.ny.us.dal.net Message of the Day -
372 - 6/10/2005 11:31
372 - By connecting to this server you agree to follow the
372 - terms of the DALnet AUP at http://www.dal.net/aup/.
372 -
376 End of /MOTD command.

type /disable showraw

so this test
Code:
raw 375:*:{
  if (!$window(@motd_ $+ $network)) { window @MOTD_ $+ $network }
  aline @MOTD_ $+ $network $2-
}

raw 372:*:{
  if (!$window(@motd_ $+ $network)) { window @MOTD_ $+ $network }
  aline @MOTD_ $+ $network $2-
}


note I did not specify window size, font or font size which may be important to you

also you might be wanting the info that is shown when you connect to a server which is often different than the reply to /motd
to get the raw numbers you can use the "showraw" group commands and reconnect to the server to see what raw codes do what

lastly the $1 in raw is your nick, so in most cases you want to capture $2-
Posted By: Riamus2 Re: MOTD Script - 06/10/05 04:01 PM
Ok, I can't test this now, and am unsure if $network is filled here. Try this and see if it works.

Code:
RAW 375:*: {
  if ($window(@MOTD_ $+ $network) == $null) {
    window @MOTD_ $+ $network
  }
  aline @MOTD_ $+ $network MOTD shown on $date(mm/dd/yyyy hh:nntt)
}
RAW 372:*: {
  aline @MOTD_ $+ $network $2-
}
RAW 376:*: {
  aline @MOTD_ $+ $network End of MOTD.
}



*EDIT* Well, I was beaten again. smile
© mIRC Discussion Forums