Forums - Open Redstone Engineers

Full Version: @USER Directing the BOT
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay so to make chat less spammy they added a feature in IRC where you can specify an in game player to send something to, In your bot please implement this. if you cant manage to grab names from your code here's and example:

channel="channelname"
text = irc.recv(2040)
step1 = text.split(channel)
step2 = step1[1]
step3 = step2.split(":")
player = step3[0]

EDIT:
then you would do something like irc.send("PRIVMSG "+channel+" :@"+player+" "+msg+"\r\n")
how does this make it only chat to one player?
(01-24-2014, 01:17 AM)Chibill Wrote: [ -> ]how does this make it only chat to one player?

If you read I said it was how to single out the player from the text received.
this won't work. read what red posted.
(01-24-2014, 01:58 AM)Chibill Wrote: [ -> ]this won't work. read what red posted.

first please give a link to what he posted, second, this is for python 2.7.X
http://forum.openredstone.org/showthread...6#pid13736

And I don't mean it won't work as code but yeah
PRIVMSG ORE(School/Build) @username msg
Should work just fine :3