mIRC Home    About    Download    Register    News    Help

Print Thread
#55799 18/10/03 12:22 PM
Joined: Oct 2003
Posts: 18
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Oct 2003
Posts: 18
how can i make a nickcompletor that underlines the first letter of the nickname i type eg: Xc0n hi sends Xc0n: hi

#55800 18/10/03 12:43 PM
Joined: Oct 2003
Posts: 50
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2003
Posts: 50
Code:
on *:INPUT:#: {
  IF ($1 ison $chan) { HALTDEF | MSG $chan $+(,$left($1,1),,$right($1,$calc($len($1) - 1)),$chr(58)) $2- }
}

ok, I know it looks a bit difficult, but it just puts the first character of the nickname ($left($1,1)) between underline control codes (Ctrl+U), then adds the rest of the nickname ($right($1,$calc($len($1) - 1))), and finally it adds a : ($chr(58)).

#55801 18/10/03 07:04 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Replace: msg $chan $+(,$left($1,1),,$right($1,$calc($len($1) - 1)),$chr(58)) $2-
With:     msg $chan $+(,$left($1,1),,$mid($1,2),:) $2-
smile

#55802 20/10/03 05:51 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
$right($1,-1)
$mid($1,2)
many many ways to remove the 1st letter of a nick :tongue:


new username: tidy_trax
#55803 20/10/03 08:34 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
You're right, but Iori's is more practical because if a user has a single character for a name, the script won't go "fubar" for a lack of better terms. It will remain uniform with the other posts.


-KingTomato
#55804 21/10/03 07:03 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You're right. but changing $right() to $mid() was not all I suggested be changed, or I wouldn't have bothered.


Link Copied to Clipboard