mIRC Home    About    Download    Register    News    Help

Print Thread
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.
Joined: Jun 2003
Posts: 4
J
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
Joined: Dec 2002
Posts: 169
J
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.

Joined: Dec 2002
Posts: 2,962
S
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.
Joined: Dec 2002
Posts: 1,922
O
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-
  }
}

Joined: May 2003
Posts: 22
S
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

Link Copied to Clipboard