mIRC Home    About    Download    Register    News    Help

Print Thread
#103233 18/11/04 10:42 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I have this code:
Code:
on ^*:TEXT:*:?:{
  settime
  set %q.text $1-
  if ($active == $chr(45) $+ psyBNC) { ech_bnc | goto end }
  echo $nick %tstmp $+ $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $chr(3) $+ $color(own text) $+ $nick $chr(3) $+ %cbrackets $+ %left $+ $chr(3) $+ $chr(3) $+ $color(own text) %q.text | halt
  :end
}

but when i press CTRL and press Enter, then its by passed, how to prevent this ? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103234 18/11/04 12:04 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
It's not 'bypassed', the on text event is never called when you send messages, use on input.


New username: hixxy
#103235 18/11/04 12:06 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
how would i make that then ? im not shurehow to use use $ctrlenter :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103236 18/11/04 12:08 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
You don't need to use $ctrlenter at all, you only need to use $ctrlenter if you want to keep support for it in your script (eg. being able to send /commands to the channel without using /say or similar)


New username: hixxy
#103237 18/11/04 12:15 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I want the text to appear as the same way it does on /msg.. now it dont..

example:

« nick » testing <<-- without CTCL + Enter.
<nick> /echo -a testing <<-- with CTRL + Enter.

look at the brackets.. that means it dont trigger my "Theme", how can i do it to trigger even due CTRL + Enter is pressed? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#103238 18/11/04 12:26 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:input:*:{
  if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) || ($ctrlenter) {
    .msg $active $1-
    echo -abcflirt &lt;whatever you like&gt;
    haltdef
  }
}


New username: hixxy
#103239 18/11/04 12:53 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Thanx, that gave me the idea how its done, with some rewriting i got it to work as i wanted.. smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard