mIRC Home    About    Download    Register    News    Help

Print Thread
#103534 22/11/04 07:51 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
How can i gather the info on $me join a channel, then echo it to the channel im joining.. i know it's gathered by raw, but the problem i have, thats if i join many channels fast, then the echo ends up in the last joined channel from all channels.. :tongue: the info i want to show is:

° The topic for: #channel is: 'Topic.'
° Topic set by: Nick on Thu:11:Nov 09:56
° Stat: +o:x +v:x total:xx mode:+xx

x = amount of users and the last one is the channel mode.. ie: +nt

and i cant solve this, how i try i still get the info echoed to the last channel i join.. :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103535 22/11/04 09:12 AM
Joined: Jan 2004
Posts: 7
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2004
Posts: 7
echo into specific channel windows not just into the currently active one. something like:

Code:
 on *:JOIN:*: {
  if ($nick == $me) {
    echo $color(join) -t $chan Joining $chan
    haltdef
  }
} 


should be a good enough example. also to get the amount of users use $nick(#chan,0,..) where .. is either, a (all), o (ops), h (halfops), v (voice), r (normal).

#103536 22/11/04 09:44 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
ok so far so good, but how to gather info about who set the topic date/time info.. that is what start the problem, then info is gathered from raw 333:*: .. and thats what send the echo to the wrong channel.. cosed by lag i guess, but dont know. and i dont know any other way to gather that info but wait for the raw ? :tongue:

hmm, tested ur code, the amount of ppl and there starts dont work at all.. i get total of 1, dosent mather how many users its in the channel.. and the oped/voiced nick is set to 0 dosent mather how many they are..

Last edited by sparta; 22/11/04 09:52 AM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103537 22/11/04 09:54 AM
Joined: Jan 2004
Posts: 7
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jan 2004
Posts: 7
use the same method, that raw should return the channel along with the topic..

#103538 22/11/04 10:12 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
if i use raw, then on join event, then the raw comes after the onjoin event.. so that means it trying to echo somthing that arent set..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103539 22/11/04 02:01 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019

raw 332:*: haltdef | echo -tc topic $2 Topic is: $3-
raw 333:*: haltdef | echo -tc topic $2 Set by $3 on $asctime($4)

The channel that the raw triggered for is $2.

Greets


Gone.
#103540 22/11/04 02:05 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
that work fine on one channel.. smile now i have to test it when i join many channels too wink do u know how to solve the user stats to ? +o/+v/total ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103541 22/11/04 02:14 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It will work, no matter how many channels you join at the same time, cuz the raw is only triggered at once, so it will be echoed to the correct channel, with each call.

That's because we are not doing /echo -a but /echo <#channel>

Regarding the statistics info, looks pretty straight forward I suppose: /help $nick and check out the aohvr parameters.

Just get the total ops, voices, regulars etc. and compare it to the total nicks in the channel.

Greets


Gone.
#103542 22/11/04 02:31 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
//echo $2 -->> $nick(#channel,0) <<-- show how many it is on the channel.. but if i try add it behind any of the raw events, then it show me 1.. so that means it havent gathered the info yet ? or somthing i missng ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103543 22/11/04 02:42 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You have to use the raw 366 for that.

raw 366:*: haltdef | echo -tc topic $2 Total: $nick($2,0,a) * Operators: $nick($2,0,o) Voices: $nick($2,0,v)

Greets

EDIT: Btw the channel mode is raw 324.


Gone.
#103544 22/11/04 02:57 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
do you also know if you can break a echo in half? i trying to echo the info to diffrent lines, not so nice looking if the echo is to long.. smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103545 22/11/04 03:03 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Nothing is preventing you from using /echo multiple times smile

echo first piece
echo second piece
echo third piece
...

If you don't want to use multiple lines then you could do something like this:

//tokenize 10 first piece $lf second piece $lf third piece | echo $*

Greets


Gone.
#103546 22/11/04 03:18 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
That solved.. now to the last problem.. wink if i join a channel, then no topic is present in it, then it wont trigger the raw 332, how can i identify that ? if the raw was triggered with $null or somthing, then i could use that.. :tongue: mirc itself dont return anything, but i would liuke to return "No topic present" :tongue: some way to do that ? or should i just let it be?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103547 22/11/04 03:37 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019

raw 366:*:{
haltdef
if !$chan($2).topic { echo -tc topic $2 No topic set. }
echo -tc topic $2 Total: $nick($2,0,a) * Ops: $nick($2,0,o) * Voices: $nick($2,0,v)
}


Greets


Gone.
#103548 22/11/04 08:28 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
thnx, that working just fine.. but how about this?

raw 332:*: haltdef | echo $2 Topic is: ' $+ $3- $+ '

that work just fine, but if the topic have the same color as my background, then the topic wont show, i tryed to use this:

if ($color(background) isin $3-) $strip($3-,c)

but no luck, any ideas? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103549 22/11/04 08:40 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:

raw 332:*: haltdef | echo -tc topic $2 Topic is: $3-
raw 333:*: haltdef | echo -tc topic $2 Set by $3 on $asctime($4)

The channel that the raw triggered for is $2.

Greets

I had already taken care of that with the supplied code. Notice how the -c switch is used with echo, along with the parameter 'topic'. That means the text will be displayed in your specified topic color, as configured in the colors dialog.

If you do alt+k in mIRC, it will take you to the colors dialog, and there you can see all the names with their according color.

For a custom scripted on join event for example, we could do //echo -tc join <channel> <text>

Greets


Gone.

Link Copied to Clipboard