mIRC Homepage
Posted By: LostServ Away Code - 27/06/04 07:20 PM
Code:
on *:TEXT:Phase:#: {
  if ($away == $true) { msg $nick I'm currently away. ( $+ $awaymsg $+ ) ( $+ $awaytime $+  seconds.)  }
  elseif ($away == $false ) { halt }
}


Is there a way I can make it read nicknames from a text file of some sort, if not then just the current nickname ($me).
Thanks in advance.
Posted By: tsoglanos Re: Away Code - 27/06/04 07:29 PM
I am not sure what excat you are asking for

you could it make it compacter

on *:TEXT:Phase:#: {
if ($away) { msg $nick I'm currently away. ( $+ $awaymsg $+ ) ( $+ $awaytime $+  seconds.)
}

;ther is no nead for
elseif ($away == $false ) { halt }}

and $me can not be used in the on text event u must use on Input
Posted By: ScoT Re: Away Code - 27/06/04 07:36 PM
on *:TEXT:Phase:#: if ($away ) { command }

the command only works if you set yourself /away message no need for $true $false

you can use a variety of things to check your nick was typed

on *:text:$(* $me *):#: { command }
of an if condition are 2 that spring to mind
if ($me isin $1-) { command }

ScoT
#mIRC Undernet
Posted By: LostServ Re: Away Code - 27/06/04 10:38 PM
tsoglanos
Quote:

;ther is no nead for
elseif ($away == $false ) { halt }}

If there wasen't before, there is now, i added a custom window to log what they said, therefore now i need it..
Posted By: ScoT Re: Away Code - 27/06/04 10:54 PM
i still don't see why you'd need

Quote:
elseif ($away == $false ) { halt } }


if ($away) will ONLY react if you are set /away message

something like the following code would only react (IF) you are away, so i see no need to check for $false

on *:TEXT:*:#: if ($away) && ($me isin $1-) { window -eds @messages 243 96 450 350 | aline @messages $nick said $1- to or about $me }
Posted By: tsoglanos Re: Away Code - 28/06/04 10:45 AM
scot i now this

but i am talking on *:TEXT:Phase:#: {
;$me can not be used
i didint say you can not use if $me isin $1-, of course $me isin $1- would be wrong to chek if you nick caled in channel becuse if somone types Sc0tchwhisky it triggerd!
becuse i was think he is tring to triggering his ohwn text , thes way i was talking about Input , som times i dont Undersendt the think caled english =)

ecuse my english..
Posted By: ScoT Re: Away Code - 28/06/04 05:26 PM
tsoglanos

i think you misunderstood, my last reply was to the poster Not to you.

no harm done, we can only give out help based on the information given, and if the poster doesn't make crystal clear what they want done, we have to use our mIRC crystal ball, the famous educated guess.

I guessed his nick was Phase from his latter point, that he wanted it either to react from a text file of his usual nicks or $me (What his nick was at the time)

The main thing is you offered to help, thats all that matters smile

ScoT
#mIRC Undernet
Posted By: tsoglanos Re: Away Code - 28/06/04 06:28 PM
Thanks scot =)

my solution would be fineli to check if somone caled you nick equal to $me in $1- $findtok($1-,$me,1,32)

Code:
  
on *:TEXT:*:#:{ 
if ($away) && ($findtok($1-,$me,1,32)) { notice $nick I am currently away $+($chr(91),$awaymsg,$chr(32),$chr(45),$chr(32),$duration($awaytime,1),$chr(93))  Messages are logged } 

}

© mIRC Discussion Forums