mIRC Home    About    Download    Register    News    Help

Print Thread
#129871 10/09/05 04:01 PM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
is there away to determine if /who was types in channel's editbox or called in the remote??

#129872 10/09/05 04:38 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you could include a var in the remote that would indicate if it was set
like
Code:
on me*:join:#: {
who $chan
set -u30 %whojoin $time $script
}

and check in a raw event like
raw 315:*:{ $iif(%whojoin,echo 12 %whojoin,echo 12 Editbox) }

Last edited by MikeChat; 10/09/05 04:42 PM.
#129873 10/09/05 08:34 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
need a : between the me & the * in the ON JOIN event

#129874 11/09/05 12:52 AM
Joined: Feb 2004
Posts: 119
D
da_hype Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Feb 2004
Posts: 119
i did this.

Code:
who {
    if ($1-) {
      _setvar noshow.who $iif($show,0,1)
      who $1-
    }
}


sometimes it works. sometimes it doesn't frown

#129875 11/09/05 06:20 AM
Joined: Jun 2005
Posts: 127
H
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
Im not sure I understand. What would you be accomplishing by setting a variable every time you use /who? That will set a var when you type it in the editbox or if its triggered by a remote, thus creating no way to distinguish. From what I understand you need, you should stick with MikeChat's script. Second, your command should even work (unless you have some wierd alias's that i dont know about). Try /help variables. Good luck.

Regards,
Austin


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
#129876 11/09/05 11:47 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
One way is to change all occurrances of 'who' to some custom alias 'remoteswho' that sets a remote flag. The other ways is using on INPUT to check the command line:

Code:
on *:INPUT:*:{
  if (($regex($1-,/^\/+ *who /i)) && (!$ctrlenter) && (!$inpaste)) {
    ; /who is called from an editbox in window $active
    ; if you don't halt or haltdef, you don't have to /who $1- here either
  }
}

#129877 11/09/05 11:53 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
[code]
on *:INPUT:#:{
if ((!$ctrlenter) && (!$inpaste) && (*who iswm $1)) {
var %commandchar = $readini($mircini, text, commandchar)
if (($istok(/ %commandchar, $left($1, 1), 32)) && (($remove($1,/) == who) || ($remove($1,%commandchar)))) {
set -u5 %who.typed.text $2-
}
}
}
[code]

Thats something simple that detects u typing /who or //who or ///who etc and loads %who.typed.text with the following words for 5 seconds, then on the raws from the who you can compare it with the names listed in the var (if there is one)

#129878 11/09/05 12:07 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Heh, so we need to combine our stuff, mine to include the alternate commandchar, yours to include cases like: // who smile

#129879 11/09/05 12:11 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
lol never even saw yours tell now, i must have been writting mine at the time u postede, a regex is much nicer isnt it.


Link Copied to Clipboard