mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
In the IRC net i visit there's such a problem: when you send a line larger than 640 bytes, only first 640 bytes of text will be delivered to channel. Though your mIRC will show you full line, as if it hadn't just been cut.

So, i need a script to split messages i enter and send 640-byte pieces. But while trying to compose such a script i found out that mIRC halts script with error when working with large variables. It can't even calculate $len($$1-) when the text is larger than kilobyte.

How can i bypass this problem? Or maybe there's already been made such a script?

PS While looking through this forum i saw using $gettok to (as i understood) get a defined piece of text. Maybe this could be useful, but the only thing i managed to find in mIRC help was Token Identifiers and no info on what "Tokens" are...

Please, help »^_^« Thanks for your attention


-= endless in a victory of a yourself =-
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
If your server allows you to send 640 bytes, there is something wrong with the server since the message size limit is 512.

Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
Most of the RusNet (www.rus-net.org) servers allow to send 640 bytes in a line, and the rest -- 675 bytes. Officially

Anyway, it doesn't solve the problem


-= endless in a victory of a yourself =-
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well mIRC has internal limits, think it is somewhere around ~920 chars. So regardless of how much you type, mIRC will forcibly cut you off when you reach that limit. Hence your problem with $len. Other than that, you'd use an ON INPUT that uses $len to see if it is > 640, then use $left to cut off the first 640 bytes, send that text, then send the rest.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Tokens are just words or fragments of data from a string, all divided by a common character or 'delimiter'.

a.b.c.d.e.f.g is 7 tokens divided by a '.' (ASCII 46)
//echo -a $gettok(a.b.c.d.e.f.g,3,46) extracts the third 'token" which is c

This wouldn't be a solution to your problem either. If anything, $left or $mid if the line weren't too long (950 bytes). But if the line is too long, how are you entering it into mIRC anyway? If the data is coming from the clipboard, you can use /play -b to message the clipboard contents to a window. You could also loop through $cb(%i) breaking each line into 500 byte chunks... etc.

Or just write smaller sentences. Convay your ideas in less words than I usually end up doing, like I am right now.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
I paste large blocks of text from browser. I want to make a script that would cut these blocks into smaller (512 bytes) pieces and say them to irc.

How can i bypass the limit of ~920 chars? I could paste several kBs in one line


-= endless in a victory of a yourself =-
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
To bypass the character limit of mIRC --- don't use mIRC. It's an internal thing, there is no way around it.


Link Copied to Clipboard