mIRC Home    About    Download    Register    News    Help

Topic Options
#27633 - 02/06/03 05:40 PM Parsing Services (Nick, Chan, Memo)
keeker Offline
Fjord artisan

Registered: 15/12/02
Posts: 204
Loc: Iowa, USA
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.

Top
#27634 - 02/06/03 05:44 PM Re: Parsing Services (Nick, Chan, Memo)
JonXP Offline
Self-satisified door

Registered: 02/06/03
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

Top
#27635 - 02/06/03 05:45 PM Re: Parsing Services (Nick, Chan, Memo)
Jerk Offline
Vogon poet

Registered: 09/12/02
Posts: 169
Loc: Wisconsin
You can't. This has been a problem with mirc scripting forever. $1- will strip out consecutive spaces.

Top
#27636 - 02/06/03 06:04 PM Re: Parsing Services (Nick, Chan, Memo)
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#27637 - 02/06/03 06:53 PM Re: Parsing Services (Nick, Chan, Memo)
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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-
  }
}

Top
#27638 - 08/06/03 10:28 PM Re: Parsing Services (Nick, Chan, Memo)
ShadowWlf Offline
Ameglian cow

Registered: 08/05/03
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

Top