|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Today, well moments ago, someone asked me how to retrieve TOPICLEN from the RAW 005 reply... so I had to whip up a rather tedious script to do just that. Looking at it though, I'd rather see this function built into mIRC. So, submitted for your approvial: ; RAW005 Script by Raccoon ©MMIV-Jan (EFnet|DALnet/#mIRC)
RAW 005:*: {
; Removing the "are supported by this server" text.
var %s = $2-, %nul = $regsub(%s,/are supported.*/,$null,%s)
; Placing the 005 returns in a variable named %RAW005.N where N is the $cid for multi-server support.
set $+(%,RAW005.,$cid) $iif($($+(%,RAW005.,$cid,.append),2),$($+(%,RAW005.,$cid),2)) %s
; This allows multiple 005 replies to be appended to the same variable. Hope it doesn't go over $len() 900.
inc -u1 $+(%,RAW005.,$cid,.append)
}
; Usage: //echo -a $RAW005(TOPICLEN)
ALIAS RAW005 {
var %a = $$1, %s = $($+(%,RAW005.,$cid),2)
var %re = /(?:^|\s) %a =(\S+)(?:\s|$)/ix
if ( $regex(%s,%re) ) return $regml(1)
var %re = /(?:^|\s) %a (?:\s|$)/ix
if ( $regex(%s,%re) ) return $true
return $false
}
ALIAS TopicLen { $iif($isid,return,editbox -a) $RAW005(TOPICLEN) } With this function, we wont have to worry about adding extra identifiers like $network, $prefix, $chanmodes, $chantypes and $modespl. - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Dec 2002
Posts: 395
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 395 |
|
|
|
|
Joined: Oct 2003
Posts: 273
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 273 |
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Yep, I always wanted this.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Motion Granted -- Well, hopefully
-KingTomato
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
If only all of my suggestions received this much support.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 428
Fjord artisan
|
Fjord artisan
Joined: Jan 2003
Posts: 428 |
I'd like to see this too.
PM
IRCnet & DALnet @#travelersinn :-: IRC for fun and relaxation :-:
|
|
|
|
Joined: Sep 2003
Posts: 70
Babel fish
|
Babel fish
Joined: Sep 2003
Posts: 70 |
Me too.
And I'm going to make another suggestion. It would be nice to have a per-network setting to override these things. We shouldn't have to rely on the networks to tell us these things for scripts and mIRC to know them.
|
|
|
|
Joined: Sep 2003
Posts: 149
Vogon poet
|
Vogon poet
Joined: Sep 2003
Posts: 149 |
I do see a small problem with thish though. The RAW 005 does vary from server to server, making things inconsistant.
But other than that, I think it is a great idea, and would make alot of scripting a little bit easier.
mIRC 6.21 - Win XP Pro (SP2) - 2.4 Ghz - 1 GB Mem irc.x-tab.org
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
There is no problem with this, as it is designed to be open and dynamic... unlike the hard-coded identifiers ($chanmodes) I mentioned above. $raw005() simply provides access to this data, regardless of what that data might be.
if ($raw005(THINGY)) echo -a This server supports THINGY. if ($raw005(KICKLEN)) echo -a This server's KICKLEN= $+ $ifmatch $+ .
- Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
Already suggested. And completely ignored, btw. :tongue:
* cold edits his posts 24/7
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
LOL. kudos on beating me to the suggestion... I guess I should have searched first. Perhaps they just like the name $RAW005 better. *shrug* - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
Haha yeah, must've been me not specifying it in the subject field :tongue: Nice to know the suggestion is getting more attention now, I thought it'd end up unnoticed.
* cold edits his posts 24/7
|
|
|
|
|