mIRC Home    About    Download    Register    News    Help

Print Thread
Parsing Services (Nick, Chan, Memo) #27633 02/06/03 04:40 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
Hi I am trying to make windows to display notices from the network's services, and this is what i got:

Code:
on *:NOTICE:*:?:{
  if ($nick == NickServ) {
    window -e @Nickserv
    aline @nickserv $1-
  }
  if ($nick == ChanServ) {
    window -e @Chanserv
    aline @Chanserv $1-
  }
  if ($nick == MemoServ) {
    window -e @Memoserv
    aline @Memoserv $1-
  }

}


This works good to open the windows and shoot the text to the window, but how do i preserve the formatting. For example:

Code:
From The Server:
[11:19:48] -NickServ-     Nick1              Nick1@215.216.i.bwrd.com
[11:19:48] -NickServ-     Nickss             Nickss@195.214.i.bwrd.com
[11:19:48] -NickServ-     TNick              TNick@143.285.i.bwrd.com
[11:19:48] -NickServ-     xtranick           xtranick@210.159.i.bwrd.com  


But this is displayed in the @Nickserv window:
Code:
Nickss Nickss@195.214.i.bwrd.com
TNick TNick@143.285.i.bwrd.com
xtranick xtranick@210.159.i.bwrd.com   
Nick1 Nick1@215.216.i.bwrd.com

And i WANT it to be like this:
Code:
Nickss       Nickss@195.214.i.bwrd.com
TNick        TNick@143.285.i.bwrd.com
xtranick     xtranick@210.159.i.bwrd.com   
Nick1        Nick1@215.216.i.bwrd.com


any one know how i can keep the formatting that the server sends?

thanks


keek: Scots - intr.v. keeked, keekˇing, keeks
To peek; peep.
Re: Parsing Services (Nick, Chan, Memo) #27634 02/06/03 04:44 PM
Joined: Jun 2003
Posts: 4
J
JonXP Offline
Self-satisified door
Offline
Self-satisified door
J
Joined: Jun 2003
Posts: 4
That's been bugging me for a while too. It seems that the remote scripting in mIRC always reduces whitespace in any string down to one character.


JonXP
KKPsi/Epsilon Theta
Re: Parsing Services (Nick, Chan, Memo) #27635 02/06/03 04:45 PM
Joined: Dec 2002
Posts: 169
J
Jerk Offline
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
You can't. This has been a problem with mirc scripting forever. $1- will strip out consecutive spaces.

Re: Parsing Services (Nick, Chan, Memo) #27636 02/06/03 05:04 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Just use /window's -t switch to set tab positions and use tabs to format the text.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: Parsing Services (Nick, Chan, Memo) #27637 02/06/03 05:53 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
There is a way around, but that requires a debug window open. You could do that on start, /window -h @x and /debug @x.
Code:
On *:notice:*:?:{
  if ????serv iswm $nick {
    var %w = @ $+ $nick
    window -e %w
    if $replace($line($debug,$line($debug,0)),$chr(32),$chr(160)) {
      aline %w $gettok($ifmatch,3-,58)
    }
    else aline %w $1-
  }
}

Re: Parsing Services (Nick, Chan, Memo) #27638 08/06/03 09:28 PM
Joined: May 2003
Posts: 22
S
ShadowWlf Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: May 2003
Posts: 22
Hmmm,

Would it be possible to edit that so that it logs into different files ie: nickserv.log, operserv.log, etc instead of opening up a @window?

Thanks


ShadowWlf
Server Administrator Rancho.ForeverChat.net