Skip to content

Commit

Permalink
* Fixed overlfow in user list, removed usless EM.defer, small bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamez01 committed Dec 1, 2014
1 parent 88330c5 commit b36da85
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 1 addition & 3 deletions lib/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ def parse_command(hash)
args = hash['args']
puts "Invalid command: command_#{command}".to_sym unless self.respond_to?("command_#{command}")
begin
EM.defer {
self.method("command_#{command}".to_sym).call(args)
} if self.respond_to?("command_#{command}")
self.method("command_#{command}".to_sym).call(args) if self.respond_to?("command_#{command}")
rescue
end
end
Expand Down
10 changes: 6 additions & 4 deletions lib/plugins/join.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ def initialize(*)
def on_join(m)
@webclient.send_command(:join, nick: m.user.nick, channel: m.channel, host: m.user.host)
@webclient.names(m.channel)
@webclient.send_command(:topic, nick: m.user.nick, channel: m.channel, topic: m.channel.topic) if m.user.nick == @webclient.nick # Update topic
@webclient.send_command(:topic, nick: m.user.nick, channel: m.channel, topic: m.channel.topic) if m.user.nick == @webclient.nick # Update topic
end

def on_part(m)
# @webclient.on_part(m.user,m.channel)
@webclient.send_command(:part, nick: m.user.nick, channel: m.channel, host: m.user.host)
@webclient.names(m.channel) unless m.user.nick == bot.nick
puts [m.user.nick,@webclient.nick].inspect
unless m.user.nick == @webclient.nick
@webclient.send_command(:part, nick: m.user.nick, channel: m.channel, host: m.user.host)
@webclient.names(m.channel) unless m.user.nick == bot.nick
end
end

def on_topic(m)
Expand Down
11 changes: 9 additions & 2 deletions public/webric.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ body {
width: 100%;
border-bottom-style: groove;
}
#users { border-left-style: groove; padding-left: 15px; }
#users {
border-left-style: groove;
padding-left: 15px;
overflow-x: auto;
overflow-y: auto;
word-wrap: normal;
white-space: normal;
}
#inputRow { margin-top: 15px; }
#chatCol {
overflow-x: auto;
overflow-x: none;
overflow-y: auto;
word-wrap: normal;
white-space: normal;
Expand Down
2 changes: 1 addition & 1 deletion public/webric.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var WebRic = {
});
var queryOptions = new URI(window.location.href).search(true);
// Hide any any configuration UI elements that are pre-defined in init configuration as these should not be overided
if ( 'userOptions' in conf) {
if ( conf && 'userOptions' in conf) {
for(var key in conf['userOptions']) {
if(typeof key == 'string') {
var elementName = '#'+key+'Group';
Expand Down

0 comments on commit b36da85

Please sign in to comment.