potato 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -308,6 +308,7 @@ Type /pass yourpassword to authenticate.
308
308
  def move_user room, user, privclass, by
309
309
  chan_notice room, "#{user} has been moved to \x16#{privclass}\x0F by #{by}"
310
310
  us = @users[room].find{|x|x.username == user}
311
+ return if us.nil? # the user is not in this room
311
312
  mode = ""
312
313
  count = 0
313
314
  unless us.symbol == sym(@client.privclasses[room][privclass])
@@ -73,7 +73,7 @@ module Potato
73
73
  def on_pass pkt
74
74
  notice "Attempting to retrieve authtoken."
75
75
  begin
76
- tok = Timeout::timeout(12) {
76
+ tok = Timeout::timeout(30) {
77
77
  Potato::DAmn::Token.get(@config.nick, pkt.args[0])
78
78
  }
79
79
  rescue Timeout::Error
@@ -22,7 +22,10 @@ module Potato
22
22
  str = str.force_encoding("UTF-8") if str.respond_to?(:force_encoding)
23
23
  @raw = str
24
24
  if str.include?(" :")
25
- @cmd, *@args, @content = str.split(" ", str[0...str.index(" :")+1].count(" ") + 1)
25
+ pieces = str.split(" ", str[0...str.index(" :")+1].count(" ") + 1)
26
+ @cmd = pieces.shift
27
+ @content = pieces.pop
28
+ @args = pieces
26
29
  @content.slice!(0)
27
30
  else
28
31
  @cmd, *@args = str.split(" ")
@@ -1,4 +1,4 @@
1
1
  module Potato
2
2
  # Current version of Potato.
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.11"
4
4
  end
data/lib/potato.rb CHANGED
@@ -1,11 +1,12 @@
1
- require "socket"
2
- require "ostruct"
3
- require "optparse"
4
- require "timeout"
5
- require "iconv"
6
- require "cgi"
7
- require "open-uri"
8
- require "net/http"
1
+ require 'socket'
2
+ require 'ostruct'
3
+ require 'optparse'
4
+ require 'timeout'
5
+ require 'iconv'
6
+ require 'cgi'
7
+ require 'open-uri'
8
+ require 'net/http'
9
+ require 'net/https'
9
10
 
10
11
  $stdout.sync = true
11
12
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: potato
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.10
5
+ version: 0.0.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joel Taylor
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-25 00:00:00 Z
13
+ date: 2011-04-26 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Potato is an IRC server that communicates with the deviantART Message Network and allows you to treat it like a regular IRC server, with support for user modes, kicks/bans, /whois-ing, etc.