mIRC Home    About    Download    Register    News    Help

Print Thread
#118543 26/04/05 11:24 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Bin gone for a while :S moved and family biz anywho im working on this away bot hopefully andy can help it works just fine but i would like it to change the user who types the away command nick to /nick $nick|away now i have tried this but it dont work frown
Code:
$nick msg $chan /nick $nick|away

appreciate all help

#118544 26/04/05 12:46 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You want to make a bot change someone else's nick? You can't do that unless you have remote access to them through a script that they are running.


Invision Support
#Invision on irc.irchighway.net
#118545 26/04/05 01:00 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
thats what i was thinking ty anyhow

#118546 26/04/05 01:19 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Good to see you, buddy! smile

#118547 26/04/05 01:28 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Glad to see you again aswell Andy i swear no matter how much i try im still a n00b to this :P

#118548 26/04/05 01:31 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You'll get there, instead of reading a newspaper before you go to work print off the help file and read that instead. grin

#118549 26/04/05 02:11 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Are you trying to make it so everyone knows the person is away? Or only so that you know (on the bot)? You could probably make it so it displays as being away on the bot (not change their nick, but it would display a person as being away) by using one of the nick list dlls.


Invision Support
#Invision on irc.irchighway.net
#118550 26/04/05 02:14 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
well what im looking to do is basicly make it public cuz when you do !away it says the person is away but after so long people cant see that line of text so i want it to display there away but thew only way i can think of is changeing the nick but it cant be done frown

#118551 26/04/05 02:22 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
How about when someone says their nickname on the channel it says they're away?

#118552 26/04/05 02:53 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, that or if the people in your channel are regulars, you can ask them to use a simple script to change their own nicks when they type !away.


Invision Support
#Invision on irc.irchighway.net
#118553 26/04/05 02:56 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Or just ask them if they are away. Heh.

#118554 26/04/05 03:01 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
i think ill try the when they say there nick it says why there away, the bot i have writes the away info to a ini file such as reason for being away, so how would i make a script to read the ini info and respond when there nick is called in the room so it would be like nick
nick is away {ini info here}

#118555 26/04/05 03:22 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Assuming the INI is like this:

[nick]
Reason=Sleeping
[nick2]
Reason=Gone

You can then use something like this:

Code:
on *:text:*:#chan: {
  var %nick.cnt 1
  while (%nick.cnt <= $nick(#,0)) {
    if ($nick(#,%nick.cnt) isin $strip($1-)) {
      if ($readini(away.ini,$nick(#,%nick.cnt)) {
        msg $chan $nick(#,%nick.cnt) is away $chr(123) $+ $readini(away.ini,$nick(#,%nick.cnt),Reason) $+ $chr(125)
      }
    }
    inc %nick.cnt
  }
}


Note that this will reply to every nick in the line of text. If someone says Hello nick1, nick2, nick3, nick4 .... it'll respond 4 times if all 4 nicks are away. This can be a flood issue. So, you can make it reply to only the first nick in the nick list that is in the line of text and away by adding "halt" as shown below:

Code:
on *:text:*:#chan: {
  var %nick.cnt 1
  while (%nick.cnt <= $nick(#,0)) {
    if ($nick(#,%nick.cnt) isin $strip($1-)) {
      if ($readini(away.ini,$nick(#,%nick.cnt)) {
        msg $chan $nick(#,%nick.cnt) is away $chr(123) $+ $readini(away.ini,$nick(#,%nick.cnt),Reason) $+ $chr(125)
        halt
      }
    }
    inc %nick.cnt
  }
}


As a couple final notes...

1) You have to remove the section for the nick when they come back. You can't just remove the away reason or this will still think they are away.

2) If you have a very large channel or a channel where people talk a lot, this can end up using a lot of work from the script by checking the nick list on every line of text. Try it and see if it lags the bot too much. You can help reduce the lag by not checking any text from other bots that "talk" a lot in a channel (like a trivia bot) where you don't need to know if they are away.


Invision Support
#Invision on irc.irchighway.net
#118556 29/04/05 01:36 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ok one more q my away bot you have to go !away (reason for being away here) and when you type it shows in the channel how can i have it eat the text so it dosnt show in the channel?

#118557 29/04/05 02:58 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
lol any one?

#118558 29/04/05 05:47 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
if you mean to everyone in the channel then you cant, if you mean just to you then use ^ in the on text and put a HALT in if its the away message, ^ in on text is like

on ^*:TEXT:!away *:#:{

#118559 29/04/05 06:14 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ill try that and what im talking about is say like this

Quote:

IRC channel
me: blah
you: blah
me: !away brb

i want it so the text in red dosnt show i have seen it done with a nether away bot just never got the script

#118560 30/04/05 07:10 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
no one can help?

#118561 02/05/05 02:11 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Tell people to msg the bot with the away command.

and use:

on *:text:!away*:?: {
commands
}

you can also set the bot to immediately close the msg (query) window so you don't have possibly hundreds open from this.

in the on text, insert:

close -m $nick


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard