|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
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 $nick msg $chan /nick $nick|away appreciate all help
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 59 |
thats what i was thinking ty anyhow
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Good to see you, buddy!
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
How about when someone says their nickname on the channel it says they're away?
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Or just ask them if they are away. Heh.
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
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}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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:
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:
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
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
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?
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 59 |
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
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 *:#:{
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 59 |
ill try that and what im talking about is say like this 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
|
|
|
|
Joined: Jan 2005
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 59 |
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
|