mIRC Home    About    Download    Register    News    Help

Print Thread
Add ":" and " " (space) after nick completion with #268950 18/05/21 09:12 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
How can add ":" and " " (space) after nick completion with TAB ?

Re: Add ":" and " " (space) after nick completion with [Re: meow81] #269006 26/05/21 08:31 PM
Joined: Jan 2021
Posts: 16
T
turbosmurfen Offline
Pikka bird
Offline
Pikka bird
T
Joined: Jan 2021
Posts: 16
It was a long time ago I made scripts. This code works great for me.
The code could take longer times in channels that have many users.
If someone else could come up with a better way, that would be nice.

Code
on 1:INPUT:#:*:{
  var %totalNicks = $nick($chan,0)
  %inc = 1
  while(%inc < %totalNicks) {
    if ($nick($chan,%inc) == $1) {
      say $+($1,:,$chr(32)) $2-
      haltdef
    }
    inc %inc
  }
}

Re: Add ":" and " " (space) after nick completion with [Re: turbosmurfen] #269010 27/05/21 09:25 AM
Joined: Jan 2004
Posts: 1,620
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,620
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-

Code
on *:INPUT:#:*:{
  if (($1 !isnum) && ($nick($chan,$1))) { say $+($1,:) $2- | haltdef }
}

Re: Add ":" and " " (space) after nick completion with [Re: maroon] #269011 27/05/21 11:07 AM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
where must be pasted
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-
?
in aliases ?

Re: Add ":" and " " (space) after nick completion with [Re: maroon] #269015 27/05/21 05:35 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
look in the status:
[19:34] *:{ Unknown command

Re: Add ":" and " " (space) after nick completion with [Re: turbosmurfen] #269016 27/05/21 05:36 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
Your snippet doesn't work to me.

Re: Add ":" and " " (space) after nick completion with [Re: meow81] #269017 27/05/21 06:10 PM
Joined: Jan 2004
Posts: 1,620
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,620
That was just a test command that accidentally got pasted. I put the code into the code-block

Re: Add ":" and " " (space) after nick completion with [Re: meow81] #269018 27/05/21 06:14 PM
Joined: Jan 2012
Posts: 173
Epic Offline
Vogon poet
Offline
Vogon poet
Joined: Jan 2012
Posts: 173
Originally Posted by meow81
where must be pasted
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-
?
in aliases ?

This is a test command. You can paste this line into the command line of the channel (Editbox) and click on the "Enter" to check how this code sets the colon after the specified nickname.
The only error is that what is most likely there is no user on your network with a nickname "mAroon" on the channel you are checking.
Therefore, you can replace this nickname with an identifier that will display your own nickname "$me":

Code
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-

Note: The result of this test will be visible only to you.


πŸ…ΈπŸ†πŸ…² - 𝔦'𝔱𝔰 𝔸 π•‚π–ŽΙ΄π™™ ᴏ𝙛 π•„π™–π–Œπ™žπ™˜
Re: Add ":" and " " (space) after nick completion with [Re: meow81] #269019 27/05/21 07:08 PM
Joined: Jan 2004
Posts: 1,620
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,620
I blindly copied the event handler you posted, assuming you had it correct. The :#: field doesn't belong there, and it works without it:

Code
on *:INPUT:*:{
  if (($1 !isnum) && ($nick($chan,$1))) { say $+($1,:) $2- | haltdef }
}

Re: Add ":" and " " (space) after nick completion with [Re: Epic] #269020 27/05/21 07:11 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
in the last version of mirc .in the status

[21:10] 32 Unknown command

if you use that command
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-

Re: Add ":" and " " (space) after nick completion with [Re: Epic] #269021 27/05/21 07:28 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
doesn't work to me
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-
it has some conflicts with other snippets in the mirc scripts editor installed.

Re: Add ":" and " " (space) after nick completion with [Re: Epic] #269022 27/05/21 07:36 PM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
Ok now it works, i had to disable a acronym snippet to make it work.

Re: Add ":" and " " (space) after nick completion with [Re: turbosmurfen] #269023 28/05/21 12:57 AM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
now works that too

Re: Add ":" and " " (space) after nick completion with [Re: meow81] #269024 28/05/21 11:34 AM
Joined: Mar 2013
Posts: 22
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 22
how to make it also for a nick that is not the first word of a phrase ?