|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
i'm using a nicklist dll, i've spoke to a few people about this and no luck, basically, the idea is, when someone joins the custom nicklist should update to show how many people are ~ (+q) but using $nick($chan,0,~) in the below returns 0 any ideas? ON *:JOIN:#:{
if ($nick == $me) {
var %nl = dll resources\dlls\nicklust3.dll,%nc = $chan,
%nl Mark $window(%nc).hwnd nLUST_CallBack hideempty nodefcolors hottrack rowselect tooltips balloontips underlinehot
%nl SetGroupText %nc 1 > Regulars
%nl AddGroup %nc 40 ~ 8 > Owners [~] $nick($chan,0,~)
}
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 194 |
Well, correct me if I'm wrong, but your talking about an owner? I'm on an IRCX server but the owner has a "." before it not a "~". However, this is to identify owners:
$nick($chan,0,q)
You have to use the mode parameter not the nicklist symbol. Good luck!
Last edited by alhammer; 10/04/05 07:41 PM.
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
you can use $nick($chan,0,~) $nick($chan,0,.) $nick($chan,0,&) $nick($chan,0,-) $nick($chan,0,*) $nick($chan,0,q) $nick($chan,0,o) $nick($chan,0,@)
etc, list goes on, i've tried every one of t hose to show how many of what are in the channel, and they all return 0
|
|
|
|
Joined: Aug 2003
Posts: 314
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 314 |
In a self join event, the channel nicklist isn't yet filled. You need to wait for raw 366 (end of /names) before $nick() will return accurate information
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
So what happens if i'm trying to update the ammount of users when other people are parting/joining etc
i can't /who everytime.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
did u ensure $chan had a value at the time ?
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 194 |
This is what I have: raw 366:*:{
echo $2 12Channel Counter: There are $nick($2,0) People in $2 ยป $nick($2,0,q) Owners, $nick($2,0,o) Hosts, $nick($2,0,v,o) Voiced
} I hope that helps. Remember though, that only for when You join a channel. Like Sigh said, raw 366 is the join event raw. When using the raw, you have to use $2 insted of $chan.
Last edited by alhammer; 10/04/05 07:51 PM.
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Aug 2003
Posts: 314
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 314 |
No /who required at all. I'm saying you cannot reference the nicklist in a join event where $nick = $me because the nicklist doesn't really exist yet. This is because the server sends you a 'join' command indicating you've joined the channel just before it sends the nicklist, so when you join a channel the join event triggers before the list of nicks is sent to you
Have your code run in a raw event, numeric 366
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Can't you create an alias, when they join and trigger the alias when they join?
alias test {
var %x = $nick($chan,0)
while (%x) {
if ($left($nick($chan,%x).pnick,1) == @) { nicklist for operators.. }
if ($left($nick($chan,%x).pnick,1) == .) { nicklist for owners.. }
dec %x
}
}
Just an example..
|
|
|
|
Joined: Feb 2005
Posts: 194
Vogon poet
|
Vogon poet
Joined: Feb 2005
Posts: 194 |
I have no clue what that DLL is or what it does, but here is what I think may work: raw 366:*: { test }
on !*:JOIN:#: { test }
on *:PART:#: { test }
alias test {
var %nl = dll resources\dlls\nicklust3.dll,%nc = $chan,
%nl Mark $window(%nc).hwnd nLUST_CallBack hideempty nodefcolors hottrack rowselect tooltips balloontips underlinehot
%nl SetGroupText %nc 1 > Regulars
%nl AddGroup %nc 40 ~ 8 > Owners [~] $nick($chan,0,q)
}
"God sometimes puts us in the dark for us to see the light"
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Well, the the On Join/Part looks like it should work if the DLL syntax is correct on the otherhand I don't think it would work for the Raw event because you are using $chan in the alias when in a Raw event $chan is null. So what you could do is when calling the alias use: test <#channel>
On !*:Join:#: { test $chan }
On !*:Part:#: { test $chan }
Raw 366:*: {
test $2
}
alias test {
blah..
}
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Im going to throw 2c worth in, even tho i havent read what everyone wrote (mahahahahhaha its been a long day) I do this
on *:JOIN:#:{ if ($nick == $me) { who $chan } } | ; set off a who on the chan
raw 352:*:{ haltdef } | ; dont display the who data (this is optional)
raw 315:*:{ haltdef | some.alias.to.do.to.the.channel $2 } | ; $2 is the channel
Since raw 366 ends the Names list, but the address list still dont hold jack all, I do a /who $chan when i first join, which comes back straight after the names list, and loads all the $ial values, then i trip the join event on the end of a who list, you could incoperate some store what channels you just joined %var and only activate the 315 alias if its in that %var (removing it afterwards), but i wrote my code so it doesnt care if you manually do another /who channel, so i didnt care. This would i think do.
on *:JOIN:#:{ if ($nick == $me) { set %on.join.who.channel.list %on.join.who.channel.list $chan | who $chan } }
raw 352:*:{ if $istok(%on.join.who.channel.list,$2,32) { haltdef } }
raw 315:*:{ if $istok(%on.join.who.channel.list,$2,32) { haltdef | set %on.join.who.channel.list $remtok(%on.join.who.channel.list,$2,1,32) | some.alias.to.do.to.the.channel $2 }
/me yells let the abuse of me begin for talking about the wrong thing.
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
sorry, i've been away for a while. This is exactly what i have that builds the custon nicklist when i join, and it auto updates when people part/join/quit or whatever, i presume the dll does all the work, as it does work properly i just thought, seeing as it updates by itself, that putting a simple $nick($chan,0,~) or whatever prefix or mode next to the group that it would show correctly the number of users with that mode i don't see it's a dll error, i'm really stumped ON *:JOIN:#:{
if ($nick == $me) {
var %nl = dll resources\dlls\nicklust3.dll,%nc = $chan,
%nl Mark $window(%nc).hwnd nLUST_CallBack hideempty nodefcolors hottrack rowselect tooltips balloontips underlinehot
%nl SetGroupText %nc 1 > Regulars [r]
%nl AddGroup %nc 40 ~ 8 > Owners [~] $nick(%nc,0,~)
%nl AddGroup %nc 50 & 7 > Protect [&]
%nl AddGroup %nc 5 . 1 > Owners [.]
%nl AddGroup %nc 10 @ 3 > Ops [@]
%nl AddGroup %nc 20 % 0 > Halfops [%]
%nl AddGroup %nc 30 + 0 > Voices [+]
%nl SetGroupPos %nc 1 end
%nl SetColor %nc bkg $color(2)
%nl SetColor %nc text %c3
%nl SetColor %nc hottext $color(1)
%nl SetColor %nc divider $color(12) $color(2)
%nl SetBranchImage %nc > 0
%nl SetHeaderColor %nc 1 %c1
%nl SetHeaderColor %nc 5 %c1
%nl SetHeaderColor %nc 10 %c1
%nl SetHeaderColor %nc 20 %c1
%nl SetHeaderColor %nc 30 %c1
%nl SetHeaderFontStyle %nc bold
}
haltdef
}
alias nlust_callback {
if ($1 = tooltip) {
dll resources\dlls\nicklust3.dll SetTipTitle $2 1 > $chr(32) $3
return Notify: $_isnotifylist($3,Yes,No)
}
elseif ($1 == popups) {
return $true
}
}
alias _isnotifylist {
if ($notify($1)) return $2
return $3
}
|
|
|
|
Joined: Aug 2003
Posts: 314
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 314 |
I told you why this happens, perhaps you'd care for an example:
raw 366:*:{
dll resources\dlls\nicklust3.dll AddGroup $2 40 ~ 8 > Owners [~] $nick($2,0,~)
}
Put it in a group so it only activates after you've first joined a channel
|
|
|
|
Joined: Apr 2005
Posts: 10
Pikka bird
|
Pikka bird
Joined: Apr 2005
Posts: 10 |
I have no clue what that DLL is or what it does, but here is what I think may work: raw 366:*: { test }
on !*:JOIN:#: { test }
on *:PART:#: { test }
alias test {
var %nl = dll resources\dlls\nicklust3.dll,%nc = $chan,
%nl Mark $window(%nc).hwnd nLUST_CallBack hideempty nodefcolors hottrack rowselect tooltips balloontips underlinehot
%nl SetGroupText %nc 1 > Regulars
%nl AddGroup %nc 40 ~ 8 > Owners [~] $nick($chan,0,q)
}
That's full of bugs! 1. do not use $chan in aliases... in aliases $chan means ACTIVE WINDOW, and not channel where the one joined 2. it's same thing, just that u write in a alias instead My ideea
alias getucnt {
var %i = 1
var %c = $1
var %sign = $2
var %signed = 0
if (!%c) haltdef
while ($nick(%c,%i).pnick) {
var %buff = $ifmatch
if ($mid(%buff,1,1) == %sign) inc %signed
inc %i
}
return %signed
}
Then u use $getucnt($chan,~)
|
|
|
|
Joined: Aug 2003
Posts: 314
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 314 |
1. do not use $chan in aliases... in aliases $chan means ACTIVE WINDOW, and not channel where the one joined Not exactly. In an alias, $chan is evaluated based on where it was called from, so if you perform the alias from a text event, $chan in the alias will return the same value it would in the event. And if you run the alias from a window's editbox, it will return the name of the active window only if it's a channel
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
I told you why this happens, perhaps you'd care for an example:
raw 366:*:{
dll resources\dlls\nicklust3.dll AddGroup $2 40 ~ 8 > Owners [~] $nick($2,0,~)
}
Put it in a group so it only activates after you've first joined a channel that still doesn't account for users who quit/part/join/get killed/get different modes
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
also try this if that pic doesn't show
Last edited by ztnaraM; 11/04/05 02:25 PM.
|
|
|
|
Joined: Aug 2003
Posts: 314
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 314 |
That image is broken
As for accounting for all that, why should it? As I said, it is purely an example. Your problem was that you couldn't get $nick() to return accurate values in a join event where $nick = $me. I explained the reason for this, and told you what to use instead. I don't think this bears repeating 3 times
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
You're not understanding me, forget the on join event all together, i can remove that and use an alias to build the nicklist, it uses no other events/aliases to update the nicklist, it's the dll that does all the work, if i can do //echo -a $nick(#,0,~) at anytime and it shows correct, why can't i implement it into the nicklist? being as it updates on it's own it should also update $nick(#,0,~)
|
|
|
|
|
|
|
|