mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2005
Posts: 2
G
gerge Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Mar 2005
Posts: 2
Hi,

Newbie question...

Most chatters on my server use the "real name" field to enter their profile url (http://....) instead of their name. I would like to create a popup item called "View Profile" that will launch a browser with the contents of the user's "real name" field.

Is this posible? I tried to figure this out for a while but it seems mIRC only sends $1 (nick) to the popup script for processing. Any way to get the real name field here?

TIA
gerge

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
That's right. To get the full name you must send a request to the server and prepare a script to handle the reply.

Copy & Paste this into the remote (Alt+R):

Code:
menu nicklist {
  View profile {
    .enable #openProfileURL 
    who $1
  }
}
 
#openProfileURL off
raw 352:*:{
  haltdef
  if (http://* iswm $9) { run $9- }
  else {
    echo -acg info * $6's real name is not a URL.
  }
}
raw 315:*:{
  haltdef
  .disable #openProfileURL
}
#openProfileURL end

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Hey i liked that method of turning the raws on and off thats clever.

I was gonna list a cutdown version of what i do, but mine leaves junk in the status window, (i leave alot of stuff in there so it dont worry me), But i have taken on your code to remove that stuff displaying from the /who, hope you dont mind the code snatch smile

The rest of this is for the Gerge.

Code:
#openProfileURL off
raw 352:*:{ haltdef | .ialmark $6 $9- }
raw 315:*:{ haltdef | .disable #openProfileURL }
#openProfileURL end
RAW 352:*:.ialmark $6 $9-
RAW 311:*:.ialmark $2 $6-
menu nicklist {
  View Profile $iif($+(http,$chr(58),//*) iswm $ial($who.nick($$1)).mark,$v2,$iif($v2,* NOT AVALIABLE *)) : { if (http://* iswm $ial($1).mark) { run $v2 } }
}
alias -l who.nick { if (!$ial($1).mark) { .enable #openProfileURL | who $1 } | return $1 }
;
;* this uses the $IAL(x).MARK property so dont use it if your already using that (not many things i have seen do)
;


If you right click a nick, you get 1 of 3 entries
(1) "View Profile" _____________________ well try and view a profile if there is one
(2) "View Profile http:\\etc etc" _________ well view that profile
(3) "View Profile * NOT AVALIABLE *" _____ guess what this one does?

It actually knows if there is a profile by the time u click on (1) "View profile" but I dont think you can change the menu contents dynamicly.

Joined: Mar 2005
Posts: 2
G
gerge Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
G
Joined: Mar 2005
Posts: 2
Thanks! works great.
gerge

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Nice use of /ialmark laugh
I implemented it in my on JOIN IAL updater and now it looks like this:

Code:
#UpdateIAL on
On me:*:join:#: who # | inc -u60 $+(%, inwho, $cid)
 
raw 352:*:{
  if $($+(%, inwho, $cid), 2) {
    haltdef 
    ; use $ial(nick).mark to retrieve full name
    .ialmark $6 $9-
  }
}
 
raw 315:*:{
  if $($+(%, inwho, $cid), 2) {
    haltdef
    dec $+(%, inwho, $cid)
  }
}
#UpdateIAL end


gerge: you're welcome smile


Link Copied to Clipboard