mIRC Home    About    Download    Register    News    Help

Print Thread
#111471 16/02/05 06:01 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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
Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
/me fears the raw
im going to have to learn it eventually
but ill put it off as long as i can


The Kodokan will move you, one way or another.
#111474 16/02/05 08:12 AM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
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
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
/debug @debug
Creates a window in which everything mirc does is logged, raw numbers are shown too.

#111478 16/02/05 06:49 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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
Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
i think ive got jeepster's numeric helpfile or something like that somewhere


The Kodokan will move you, one way or another.
#111480 16/02/05 07:23 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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,


Mentality/Chris
#111481 16/02/05 07:30 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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
Joined: Jan 2005
Posts: 75
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2005
Posts: 75
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
Joined: Feb 2005
Posts: 34
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
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
Joined: Jan 2005
Posts: 75
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2005
Posts: 75
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
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
Curious is that per RFC or a certain flavor of ircd?

#111486 17/02/05 12:23 PM
Joined: Jan 2005
Posts: 75
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2005
Posts: 75
Unreal IRCD

#111487 17/02/05 02:14 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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