mIRC Home    About    Download    Register    News    Help

Print Thread
#111471 16/02/05 06:01 AM
C
clutz1572
clutz1572
C
hello again,

i am hoping that someone might be able to shed some light on this for me.. i am trying to parse a channel topic to get the the nick who posted the topic and time and input it into a dialog ... but have been unsuccesful.
what is the proper way of doing this.. ? i can pull the topic via: $chan(#).topic but thats as far as i have gotten.
i've tried to tokenize it, but when i call the item positions if the topic has spaces in it it just loads those items from the topic itself example: this is a test and if tokenized would return a for $3 and test for $4.. and i've also tried to use gettok to pull it from the $chan(#).topic string directly... but still a no-go,,

so, what is the proper way to do this??
thanks in advance.

#111472 16/02/05 06:42 AM
J
JAFO
JAFO
J
Look at This , I was working on something similar. And thats the help these guys gave me and it worked great.

#111473 16/02/05 07:44 AM
R
ricky_knuckles
ricky_knuckles
R
/me fears the raw
im going to have to learn it eventually
but ill put it off as long as i can

#111474 16/02/05 08:12 AM
K
k1tkra04
k1tkra04
K
This is what I use, feel free to edit it however smile

Code:
 
raw *:*: {
if ($numeric == 332) { echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Joined $2 $+ 9] | echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Topic9: $+ 11 $+ $3- $+ 9] | haltdef }
  if ($numeric == 333) { echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Set by9:11 $+ $3 $+ : $+ $asctime($4) $+ 9] | halt )
  



-arkt1k

#111475 16/02/05 12:56 PM
C
clutz1572
clutz1572
C
funny, that raw 333 isn't in the rfc..... but is there any other way to do it besides using raw?... if not i think it should work as long as i set it as %var like the examples shown..

thanks for your help guys..

#111476 16/02/05 05:08 PM
J
JAFO
JAFO
J
I have a small script that i found that will display every raw event in a small @window its called @NumberParse, i can send you the code if you want it , i just cant remember for the life of me where i got it from. It helped me a lot with the raw events , and if i managed to use them in any way i'm sure you wont have a problem with them at all ....... theyre similar to on Events.

#111477 16/02/05 06:16 PM
L
LethPhaos
LethPhaos
L
/debug @debug
Creates a window in which everything mirc does is logged, raw numbers are shown too.

#111478 16/02/05 06:49 PM
J
JAFO
JAFO
J
Right , i was using that but it fills with all sorts of other stuff too...... but indeed that does work.

#111479 16/02/05 07:18 PM
R
ricky_knuckles
ricky_knuckles
R
i think ive got jeepster's numeric helpfile or something like that somewhere

#111480 16/02/05 07:23 PM
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
This was recently put up as often people find it difficult to find Jeepster's file, and when it is found it seems 6 months down the line the URL is no longer valid, might be interested smirk

Regards,

#111481 16/02/05 07:30 PM
J
JAFO
JAFO
J
Heh, yeah i have Jeepsters too and also cant find a valid url for it anymore. And yes Mentality i just noticed that today, a very nice addition!

#111482 16/02/05 07:42 PM
Z
ztnaraM
ztnaraM
Z
That lists alot of raws, but also has alot missing, i have raws in 800's and 900's smirk

#111483 16/02/05 11:14 PM
K
k1tkra04
k1tkra04
K
Quote:

raw *:*: {
if ($numeric == 332) { echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Joined $2 $+ 9] | echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Topic9: $+ 11 $+ $3- $+ 9] | haltdef }
if ($numeric == 333) { echo $2 9[ $+ 11 $+ $timestamp $+ 9] [11Set by9:11 $+ $3 $+ : $+ $asctime($4) $+ 9] | halt )





This is what I get with that code:

[05:19:19] [Joined #root]
[05:19:19] [Topic:- choice$ -]
[05:19:19] [Set by:HumbleSage:Tue Feb 15 07:06:18 2005]


So it works for me.

#111484 16/02/05 11:55 PM
Z
ztnaraM
ztnaraM
Z
Code:
 Raw 332:*:{ 
  var %i = 1
  while ($strip($wrap($3-,ProFontWindows, 6,580, 0, %i))) {
    echo $2 11,15 $+ $str($chr(160),2) $+ topic $+  $+ $str($chr(160),23) 09|10  [ $ifmatch ]
    inc %i
  }
  halt
}

Raw 333:*:{  echo $2 11,15 $+ $str($chr(160),2) $+ topic $+  $+ $str($chr(160),23) 09|10 set by 09 $+ $3 10on the $asctime($4,mm $+ 09 $+ / $+ 10 $+ dd $+ 09 $+ / $+ 10 $+ yy 09@10 hh $+ 09 $+ : $+ 10 $+ nn $+ 09 $+ 01t)) | halt } 


i use wrap alot now, so i got help with that bit, the rest i'm sure could be filtered out.

#111485 17/02/05 08:35 AM
A
Armada
Armada
A
Curious is that per RFC or a certain flavor of ircd?

#111486 17/02/05 12:23 PM
Z
ztnaraM
ztnaraM
Z
Unreal IRCD

#111487 17/02/05 02:14 PM
C
clutz1572
clutz1572
C
thanks Mentality,

for posting that link smile

question tho.... is there a way to refresh the raw info..?
i have this set to go into a dialog via a variable set on the raw, and this seems like a on join type of event (using the raw) so, if like if someone changes the topic is it possible to recapture the new topic this way??

Last edited by clutz1572; 17/02/05 02:19 PM.

Link Copied to Clipboard