Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor nitpicks #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bridge.db
bridge.log
12 changes: 7 additions & 5 deletions modules/ircclient/ircclient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def handle_user_input(msg)
else
unless @channel == nil
@sock.write("PRIVMSG #{@channel.name} :#{msg}\n")
reply_user(@jid, "sent to: #{@channel.name}", "std")
# reply_user(@jid, "sent to: #{@channel.name}", "std")
else
reply_user(@jid, "not active on a channel: use .c or .j", "std")
end
Expand Down Expand Up @@ -926,10 +926,12 @@ def send_to_user
mode = $5
target = $6
user = get_user_from_nick(target)
if mode == "+o"
user.op = true
elsif mode == "-o"
user.op = false
if !user.nil?
if mode == "+o"
user.op = true
elsif mode == "-o"
user.op = false
end
end
mode_msg = "*** [#{channel_name}] MODE #{mode} #{target} by #{nick}"
reply_user(@jid, mode_msg.chomp, "std")
Expand Down
2 changes: 1 addition & 1 deletion modules/main/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def presence_updates_handler(contact,presence)
seen = Time.now.strftime('%Y-%m-%d %H:%M:%S')
$db.execute("UPDATE roster SET lastseen='#{seen}' WHERE rjid='" + sql_sanitize(ujid) + "'")
#quit_bridged_app(ujid)
leave_lobby(ujid, "unavailable")
#leave_lobby(ujid, "unavailable")
end

end
Expand Down
4 changes: 2 additions & 2 deletions xmppbridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
$bridged_app_timeout = config['timeout'].to_i

# Debuging: true = extensive xmpp output to stderr
debug_mode = true
debug_mode = false

# Initial setting for botmasters to see source code for botcmds when
# they are executed (very noisy when enabled)
Expand Down Expand Up @@ -219,7 +219,7 @@ def sql_sanitize(str)
$db.execute("CREATE INDEX banidx ON bans (jid)")

# populate roster table with default bot masters
$db.execute("INSERT INTO roster (rjid,rlvl,rnick,rpasswd,in_lobby) VALUES ('#{$default_master}','owner','Steve','foobar99', '1')")
$db.execute("INSERT INTO roster (rjid,rlvl,rnick,rpasswd,in_lobby) VALUES ('#{$default_master}','owner','#{$botnick}','foobar99', '1')")
$masters << $default_master
logit("done inserting default master user")

Expand Down