mIRC Home    About    Download    Register    News    Help

Print Thread
Re: MOTD Script #132000 06/10/05 03:12 PM
Joined: Oct 2005
Posts: 5
O
OsTrailYa Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
O
Joined: Oct 2005
Posts: 5
Hey,

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


thanks in advanced

Re: MOTD Script #132001 06/10/05 03:53 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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-

Re: MOTD Script #132002 06/10/05 04:01 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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

Last edited by Riamus2; 06/10/05 04:05 PM.

Invision Support
#Invision on irc.irchighway.net