Forums - Open Redstone Engineers
@USER Directing the BOT - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html)
+--- Forum: Programming (https://forum.openredstone.org/forum-8.html)
+--- Thread: @USER Directing the BOT (/thread-2145.html)



@USER Directing the BOT - qwerasd205 - 01-24-2014

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")


RE: @USER Directing the BOT - Chibill - 01-24-2014

how does this make it only chat to one player?


RE: @USER Directing the BOT - qwerasd205 - 01-24-2014

(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.


RE: @USER Directing the BOT - Chibill - 01-24-2014

this won't work. read what red posted.


RE: @USER Directing the BOT - qwerasd205 - 01-24-2014

(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


RE: @USER Directing the BOT - Chibill - 01-24-2014

http://forum.openredstone.org/showthread.php?tid=2084&pid=13736#pid13736

And I don't mean it won't work as code but yeah


RE: @USER Directing the BOT - redstonewarrior - 01-27-2014

PRIVMSG ORE(School/Build) @username msg
Should work just fine :3