|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I added the following line hadd -m visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: )
to the following code at the location marked with a ; on *:join:*: {
hinc -m visits $+(Joins.,$address)
hadd -m visits $+(Nicks.,$address) $addtok($hget(visits,$+(nicks.,$address)),$nick,32)
hadd -m visits $+(Jointime.,$address) $fulldate
write -IL1 $+(visits/visits-,$address,.txt) $hget(visits,$+(nicks.,$address))
write -IL2 $+(visits/visits-,$address,.txt) $hget(visits,$+(Joins.,$address))
; hadd -m visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: )
}
on *:Nick: {
hadd -m visits $+(nicks.,$address) $addtok($hget(visits,$+(nicks.,$address)),$newnick,32)
write -IL2 $+(visits/visits-,$address,.txt) $hget(visits,$+(Joins.,$address))
}
on *:kick:*: {
hinc -m visits $+(kicked.,$address)
write -a $+(visits/visits-,$address,.txt) Kicked by $nick $1-
write $+(-,is,$address) visits/kicks.txt $address Kicked by $nick $hget(visits,$+(kicked.,$address))
}
on *:quit: { write -a $+(visits/visits-,$address,.txt) $+($hget(visits,$+(jointime.,$address)),$fulldate) Quit: $1- }
on *:part:*: { write -a $+(visits/visits-,$address,.txt) $+($hget(visits,$+(jointime.,$address)),$fulldate) Parted: $1- }
on *:exit: { hsave -o visits visits/visits.hsh }
on *:start: {
hmake visits 50
$iif( !isdir(visits) , mkdir visits )
$iif( $isfile(visits/visits.hsh) , hload visits visits/visits.hsh )
}
Then I modified this script to read the information from the hash table. The problem is, the information isn't being displayed. Not getting any errors, but also not seeing the information that should be being displayed. A quick response and solution would be greatly appreciated. Modified coding has been remarked on *:TEXT:!showme *:*:{
if (!$2) {
if $read($mknickfn($nick),1) != [pro] write -il1 $mknickfn($nick) [pro]
describe %td.chan says $nick $+ 's profile is on the way. Please be patient while it's being displayed
; .msg %td.chan $nick $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0)))
.play -tpro %td.chan $mknickfn($nick) 2000
}
elseif ($2 ison %td.chan) && ($target == %td.chan) && $exists($mknickfn($2)) == $true {
if $read($mknickfn($2),1) != [pro] write -il1 $mknickfn($2) [pro]
.msg $nick Here is $2 $+ 's profile
if ($2 != $nick) { describe %td.chan takes $2 by the hand and parades them around the room, stopping in front of $nick }
elseif ($2 == $nick) { describe %td.chan holds up a full length mirror in front of $nick $+ , so that they can see themselves }
if $nick isop # { .play $nick $mknickfn($2) 2000 }
else .play -tpro $nick $mknickfn($2) 2000
; .msg $nick $2 $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0)))
}
elseif $exists($mknickfn($2)) == $true {
if $read($mknickfn($2),1) != [pro] write -il1 $mknickfn($2) [pro]
.msg $nick Here is $2 $+ 's profile
if $nick isop # { .play $nick $mknickfn($2) 2000 }
else .play -tpro $nick $mknickfn($2) 2000
; .msg $nick $2 $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0)))
}
else .msg $nick I can't find a profile for $2
}
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
; hadd -m visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) ^ Im going to assume $read($mknickfn($nick),s,Limits: ) comes back with a value here else there wont be anything to show anyway
; .msg %td.chan $nick $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0))) ; .msg $nick $2 $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0))) ; .msg $nick $2 $+ 's Limits are: $hget(visits,$+(Limits.,$address($2,0)))
$address != $address($2,0)
try $gettok($address($2,5),2,33)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Well, I suppose I should've done this first, but I didn't..duh...for some reason the information isn't being stored in the hash table. When I do a manual check (using /echo) of the location where the information should be being stored, I get * /echo: insufficient parameters The line I'm using to store the information in the hash table is hadd -m visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) $read(RusselB,s,Limits: ) returns Phone (subject to discussion), scat, kids, animals, permanent marks, golden showers, changing my gender, Webcam available on MSN or Yahoo only, No creative writing, male on male, No mic/sound files...others subject to discussion if they come up This is what I'm trying to get stored in the hash table. Problem either isn't or partially isn't where I thought it was when I first posted this, but part (or maybe all) of the problem is in getting the information into the table.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
ok try this... hadd -m visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) change to
echo -st CP ONJOIN : $!nick = $nick
echo -st CP ONJOIN : $!mknickfn($nick) = $mknickfn($nick)
echo -st CP ONJOIN : $!read($mknickfn($nick),s,Limits: ) = $read($mknickfn($nick),s,Limits: )
hadd -ms visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: )
[qoute]$read(RusselB,s,Limits: ) returns Phone (subject to discussion), scat, kids, animals, permanent marks, golden showers, changing my gender, Webcam available on MSN or Yahoo only, No creative writing, male on male, No mic/sound files...others subject to discussion if they come up[/qoute] Two things here Dude.... (1) Seek some help your discussion groups are disturbing (snicker snicker) (2) Your accessing a file called "RusselB" so if "JohnH" joined the channel you would have to have a file called "JohnH" do you have a file for each nick joining the channel? (seems a bit odd way to store things)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Two things here Dude.... (1) Seek some help your discussion groups are disturbing (snicker snicker) (2) Your accessing a file called "RusselB" so if "JohnH" joined the channel you would have to have a file called "JohnH" do you have a file for each nick joining the channel? (seems a bit odd way to store things) LOL to number 1...re: #2: when I started this project, my experience in mIRC programming was non-existant, so I took what was the easiest method for me to follow...I am in the process of migrating the information, but it takes time to get all the coding correct.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
OK...your suggestions have been entered and tested...the information being echoed with echo -st CP ONJOIN : $!nick = $nickecho -st CP ONJOIN : $!mknickfn($nick) = $mknickfn($nick)echo -st CP ONJOIN : $!read($mknickfn($nick),s,Limits: ) = $read($mknickfn($nick),s,Limits: ) is correct...however the line hadd -ms visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) is coming up with something similar to * Added item 'Limits.<!user@host> ' to hash table 'visits'
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
is coming up with something similar to * Added item 'Limits.<!user@host> ' to hash table 'visits' ^ as it should do accept it should look like * Added ietm 'Limits.user@host' to hash table 'visits' becuase thats what $address evaluates into. I did forget that when doing a /hadd -s it doesnt show you the value it sets so make the lines look like this echo -st CP ONJOIN : $!nick = $nick echo -st CP ONJOIN : $!mknickfn($nick) = $mknickfn($nick) echo -st CP ONJOIN : $!read($mknickfn($nick),s,Limits: ) = $read($mknickfn($nick),s,Limits: ) echo -st CP ONJOIN : hadd -ms visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) hadd -ms visits $+(Limits.,$address) $read($mknickfn($nick),s,Limits: ) now you well see what the hadd line is thats run and what the result is etc. OH and you didn change the other parts of the code to read $gettok($address($2,5),2,33) and NOT $address($2,0) didnt you?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Thanks for the help...got it all working now...or at least for that project..
|
|
|
|
|