Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Commit

Permalink
fixed /names in other clients
Browse files Browse the repository at this point in the history
  • Loading branch information
Syd committed Feb 28, 2009
1 parent 2daea62 commit 73647cb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions twirc.rb
Expand Up @@ -62,24 +62,23 @@ def privmsg(sender, message, channel=nil)

def do_twitter_connection()
@twit = Twitter::Base.new(@nickname, @password)
rpl RPL_MOTDSTART, ":#{$servername} message of the day - "
rpl RPL_MOTD, ":thank you for using this server"
rpl RPL_MOTDSTART, ":- #{$servername} message of the day"
rpl RPL_MOTD, ":Thank you for using TwitRC"
rpl RPL_ENDOFMOTD, ":End of /MOTD command"
send_data ":#{@nickname}!#{$servername} JOIN :#twitter\n"
send_data ":#{$sername} MODE #twitter +ns\n"
names = ""
@twit.friends.each do |u|
names << "#{u.screen_name} "
names << " #{u.screen_name}"
end
rpl RPL_NAMREPLY, ":@twitter @#{nickname} #{names}", "#twitter"
rpl RPL_NAMREPLY, ":@twitter @#{@nickname}#{names}", "@ #twitter"
rpl RPL_ENDOFNAMES, ":End of /NAMES list.", "#twitter"
@twit.friends.each do |u|
privmsg(u.screen_name,CGI::unescapeHTML(u.status.text),"#twitter")
end
end

def rpl(num, message, channel=nil)
#send_data ":localhost #{id} #{@nickname} #{channel} :#{message}\n"
send_data ":#{$servername} #{num} #{@nickname} #{channel} #{message}\n"
end

Expand Down

0 comments on commit 73647cb

Please sign in to comment.