mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
I currently have this script:
Code:
on 1:text:!vhost *:#h*****s: {
  if ($me == seanturner70) {
    write "C:\Documents and Settings\Sean's\My Documents\My Dropbox\Public\vhost.htm" A vHost of $3 was granted to $2 by $nick at $time GMT || $asctime($calc($gmt - $duration(8hrs)),HH:nn:ss) PST || $date  
  }
}


However, it ends up like:
Quote:
A vHost of it.com was granted to Mt by D**7 at 19:39:53 GMT || 11:39:53 19.01.09 A vHost of Mon.vhost was granted to Min by Dy17 at 19:46:24 GMT || 11:46:24 PSA 19.01.09 A vHost of Milhost was granted to Thr by Do17 at 19:47:16 GMT || 11:47:16 PSA 19.01.09


Nothing is missing, but it is all on the same line...
Is there a way to avoid this without needing to change to a .txt which means that you need to download it?

I automatically have it go to that folder so it is synced and displayed within seconds on the web.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
If you open the file in a text editor you'll see mIRC is correctly writing to a new line each time you run that command. The problem is that you're then serving that plain text as HTML. HTML doesn't display newlines, which is why it all appears on a single line in a web browser. To fix this you need to add an HTML line-break tag (<br>) at the end of each line of text you write to that file.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
ok, is there a way to automate that?
It won't just be me that runs the command, and there could potentially be hundreds of requests every day.

Thanks though, I opened it, and it did look the correct way.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Add <br> to the end of the line...
Code:

on 1:text:!vhost *:#h*****s: {
  if ($me == seanturner70) {
    write "C:\Documents and Settings\Sean's\My Documents\My Dropbox\Public\vhost.htm" A vHost of $3 was granted to $2 by $nick at $time GMT || $asctime($calc($gmt - $duration(8hrs)),HH:nn:ss) PST || $date <br>
  }
}



Joined: Oct 2008
Posts: 167
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
oh, that was simple.

Thank you so much!


Link Copied to Clipboard