|
Joined: Dec 2006
Posts: 39
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2006
Posts: 39 |
ive save nick and kick reason using this code
alias save .hadd -m v $+($2,$chr(64),$3)
then when i want use back saperately its doesnt working
alias cake { %num = $hget(v,*).item !kick # $gettok($hget(v,%num).item,1,64) $gettok($hget(v,%num).item,2,64) |
then how i want del the name have been kick .. i means ill del if me or anyone else kick .. im stuck on this
on *:kick:#:{ .hdel v $+($knick,$chr(64), ???) }
thanks
Last edited by skovicniq; 23/01/09 05:36 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
1) Your save alias is missing a parameter. The proper format should be .hadd -m v $+($2,$chr(64),$3) <something else here> You're missing information for <something else here> 2) What is information is being passed to the save alias? 3) You can't assign a variable using $hget and a wildcard. There's not enough information being relayed for the variable to be properly assigned. 4) In the ON KICK event, as you currently have it, you could use the -w switch and replace the ??? with an * This probably wouldn't be your best option, but I will need an answer to my my query in number 2 to make a decent recommendation.
|
|
|
|
Joined: Dec 2006
Posts: 39
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2006
Posts: 39 |
actually its looks like this on @!*:text:#: {
if $regex bla bla .signal -n k $1-2 reason
if ($signal == k) {
;$2 nick $3 reason
.hadd -m v $+($2,$chr(64),$3)
}
}
on *:kick:#: {
.hdel v $+($knick,$chr(64),*)
.timerdelaykick 1 3 delayk
}
alias delayk {
%num = $hget(v,*).item
!kick # $gettok($hget(v,%num).item,1,64) $gettok($hget(v,%num).item,2,64)
.hdel v $+($knick,$chr(64),*)
} its just a delay kick .. and what i want here to get the nick back and the kick reason that ive saved
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
While my knowledge of regex is limited, and my knowledge of signal is non-existant, I can see that the $regex is incorrect, and I don't see where the nick is being passed via the /signal command. Try this
on @*:text:*:#:{
;copied this line from your code, just modified the information being sent using the /signal command
if $regex bla bla .signal -n k $nick reason
if ($signal == k) {
.hadd -m v $2 $3
}
}
on *:kick:#: {
.hdel v $knick
.timerdelaykick 1 3 delayk $knick $chan
}
alias delayk {
!kick $2 $1 $hget(v,$1)
}
When using an alias, all of the required parameters must be passed to it. You were calling the delayk alias, but not passing any parameters, therefore the alias had no way of knowing what information it was supposed to work with. Based on your original code, the following will generate a list of the nicks and the reason as stored in your hash table.
alias view {
var %a = 1, %b = $hget(v,0).item
while %a <= %b {
.timer 1 %a echo -a Nick: $gettok($hget(v,%a).item,1,64) Reason: $gettok($hget(v,%a).item,2-,64)
inc %a
}
}
|
|
|
|
|