campfire-bot 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +0,0 @@
1
- require 'open-uri'
2
- require 'hpricot'
3
- require 'tempfile'
4
-
5
- class Bruce < CampfireBot::Plugin
6
- on_command 'bruce', :fail
7
-
8
- def fail(msg)
9
- # Scrape random fail
10
- bruce = (Hpricot(open('http://www.schneierfacts.com/'))/'p.fact').first
11
- msg.speak(CGI.unescapeHTML(bruce.inner_html))
12
- rescue => e
13
- msg.speak e
14
- end
15
- end
@@ -1,198 +0,0 @@
1
- require 'yaml'
2
-
3
- # Lookup bug titles and URLs when their number is mentioned or on command.
4
- #
5
- # You'll probably want to at least configure bugzilla_bug_url with the
6
- # URL to your bug tracking tool. Put a '%s' where the bug ID should be
7
- # inserted.
8
- #
9
- # Several other options are available, including the interval in which
10
- # to avoid volunteering the same information, and whether to show the
11
- # url with the title.
12
- #
13
- # HTMLEntities will be used for better entity (&ndash;) decoding if
14
- # present, but is not required.
15
- #
16
- # Similarly, net/netrc will be used to supply HTTP Basic Auth
17
- # credentials, but only if it's available.
18
- #
19
- # While is designed to work with Bugzilla, it also works fine with:
20
- # * Debian bug tracking system
21
- # * KDE Bug tracking system
22
- # * Trac - if you configure to recognize "tickets" instead of "bugs"
23
- # * Redmine - if you configure to recognize "issues" instead of "bugs"
24
- class Bugzilla < CampfireBot::Plugin
25
- on_command 'bug', :describe_command
26
- # on_message registered below...
27
-
28
- config_var :data_file, File.join(BOT_ROOT, 'tmp', 'bugzilla.yml')
29
- config_var :min_period, 30.minutes
30
- config_var :debug_enabled, false
31
- config_var :bug_url, "https://bugzilla/show_bug.cgi?id=%s"
32
- config_var :link_enabled, true
33
- config_var :bug_id_pattern, '(?:[0-9]{3,6})'
34
- config_var :bug_word_pattern, 'bugs?:?\s+'
35
- config_var :mention_pattern,
36
- '%2$s%1$s(?:(?:,\s*|,?\sand\s|,?\sor\s|\s+)%1$s)*'
37
-
38
- attr_reader :bug_timestamps, :bug_id_regexp, :mention_regexp,
39
- :use_htmlentities, :use_netrc
40
-
41
- def initialize()
42
- super
43
- @bug_id_regexp = Regexp.new(bug_id_pattern, Regexp::IGNORECASE)
44
- @mention_regexp = Regexp.new(sprintf(mention_pattern,
45
- bug_id_pattern, bug_word_pattern),
46
- Regexp::IGNORECASE)
47
- self.class.on_message mention_regexp, :describe_mention
48
-
49
- @bug_timestamps = YAML::load(File.read(@data_file)) rescue {}
50
- if link_enabled
51
- require 'shorturl'
52
- end
53
-
54
- # Put this in the constructor so we don't fail to find htmlentities
55
- # every time we fetch a bug title.
56
- begin
57
- require 'htmlentities'
58
- @use_htmlentities = true
59
- rescue LoadError
60
- debug "Falling back to 'cgi', install 'htmlentities' better unescaping"
61
- require 'cgi'
62
- end
63
- begin
64
- require 'net/netrc'
65
- @use_netrc = true
66
- rescue LoadError
67
- debug "Can't load 'net/netrc': HTTP Auth from .netrc will be unavailable"
68
- require 'cgi'
69
- end
70
- end
71
-
72
- def debug(spew)
73
- $stderr.puts "#{self.class.name}: #{spew}" if debug_enabled
74
- end
75
-
76
- def describe_mention(msg)
77
- debug "heard a mention"
78
- match = msg[:message].match(mention_regexp)
79
- describe_bugs msg, match.to_s, true
80
- end
81
-
82
- def describe_command(msg)
83
- debug "received a command"
84
- debug "msg[:message] = #{msg[:message].inspect}"
85
- describe_bugs msg, msg[:message], false
86
- end
87
-
88
- protected
89
-
90
- def describe_bugs(msg, text, check_timestamp)
91
- summaries = text.to_s.scan(bug_id_regexp).collect { |bug|
92
- debug "mentioned bug #{bug}"
93
- now = Time.new
94
- last_spoke = (bug_timestamps[msg[:room].name] ||= {})[bug]
95
- if check_timestamp && !last_spoke.nil? && last_spoke > now - min_period
96
- debug "keeping quiet, last spoke at #{last_spoke}"
97
- nil
98
- else
99
- debug "fetching title for #{bug}"
100
- url = sprintf(bug_url, bug)
101
- html = http_fetch_body(url)
102
- if !m = html.match("<title>([^<]+)</title>")
103
- raise "no title for bug #{bug}!"
104
- end
105
- debug "fetched."
106
- title = html_decode(m[1])
107
- title += " (#{ShortURL.shorten(url)})" if link_enabled
108
- bug_timestamps[msg[:room].name][bug] = now
109
- title
110
- end
111
- }.reject { |s| s.nil? }
112
- if !summaries.empty?
113
- expire_timestamps
114
- n = bug_timestamps.inject(0) { |sum, pair| sum + pair[1].size }
115
- debug "Writing #{n} timestamps"
116
- File.open(data_file, 'w') do |out|
117
- YAML.dump(bug_timestamps, out)
118
- end
119
- # Speak the summaries all at once so they're more readable and
120
- # not interleaved with someone else's speach
121
- summaries.each { |s|
122
- debug "sending response: #{s}"
123
- msg.speak s
124
- }
125
- else
126
- debug "nothing to say."
127
- end
128
- end
129
-
130
- # Don't let the datafile or the in-memory list grow too
131
- # large over long periods of time. Remove entries that are
132
- # well over min_period.
133
- def expire_timestamps
134
- debug "Expiring bug timestamps"
135
- cutoff = Time.new - (2 * min_period)
136
- recent = {}
137
- bug_timestamps.each { |room, hash|
138
- recent[room] = {}
139
- hash.each { |bug, ts|
140
- recent[room][bug] = ts if ts > cutoff
141
- }
142
- recent.delete(room) if recent[room].empty?
143
- }
144
- @bug_timestamps = recent
145
- end
146
-
147
- # Returns the non-HTML version of the given string using
148
- # htmlentities if available, or else unescapeHTML
149
- def html_decode(html)
150
- if use_htmlentities
151
- HTMLEntities.new.decode(html)
152
- else
153
- CGI.unescapeHTML(html)
154
- end
155
- end
156
-
157
- # Return the HTTPResponse
158
- #
159
- # Use SSL if necessary, and check .netrc for
160
- # passwords.
161
- def http_fetch(url)
162
- uri = URI.parse url
163
- http = Net::HTTP.new(uri.host, uri.port)
164
-
165
- # Unfortunately the net/http(s) API can't seem to do this for us,
166
- # even if we require net/https from the beginning (ruby 1.8)
167
- if uri.scheme == "https"
168
- require 'net/https'
169
- http.use_ssl = true
170
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
171
- end
172
-
173
- res = http.start { |http|
174
- req = Net::HTTP::Get.new uri.request_uri
175
- cred = netrc_credentials uri.host
176
- req.basic_auth *cred if cred
177
- http.request req
178
- }
179
- end
180
-
181
- # Returns only the document body
182
- def http_fetch_body(url)
183
- res = http_fetch(url)
184
- case res
185
- when Net::HTTPSuccess
186
- res.body
187
- else res.error!
188
- end
189
- end
190
-
191
- # Returns [username, password] for the given host or nil
192
- def netrc_credentials(host)
193
- # Don't crash just b/c the gem is not installed
194
- return nil if !use_netrc
195
- obj = Net::Netrc.locate(host)
196
- obj ? [obj.login, obj.password] : nil
197
- end
198
- end
@@ -1,43 +0,0 @@
1
- require 'open-uri'
2
- require 'hpricot'
3
- require 'tempfile'
4
-
5
- class Calvin < CampfireBot::Plugin
6
- BASE_URL = 'http://marcel-oehler.marcellosendos.ch/comics/ch/'
7
- START_DATE = Date.parse('1985-11-18')
8
- END_DATE = Date.parse('1995-12-31') # A sad day
9
-
10
- on_command 'calvin', :calvin
11
-
12
- def calvin(msg)
13
- comic = case msg[:message].split(/\s+/)[0]
14
- when 'random'
15
- fetch_random
16
- when /d+/
17
- fetch_comic(msg[:message].split(/\s+/)[0])
18
- else
19
- fetch_random
20
- end
21
-
22
- msg.speak(comic)
23
- end
24
-
25
- private
26
-
27
- def fetch_random
28
- fetch_comic(rand(number_of_comics))
29
- end
30
-
31
- def fetch_comic(id = nil)
32
- date = id_to_date(id)
33
- "#{BASE_URL}#{date.strftime('%Y')}/#{date.strftime('%m')}/#{date.strftime('%Y%m%d')}.gif"
34
- end
35
-
36
- def id_to_date(id)
37
- (START_DATE + id.days).to_date
38
- end
39
-
40
- def number_of_comics
41
- (END_DATE - START_DATE).to_i
42
- end
43
- end
@@ -1,23 +0,0 @@
1
- require 'open-uri'
2
- require 'hpricot'
3
-
4
- class Chuck < CampfireBot::Plugin
5
- on_command 'chuck', :chuck
6
-
7
- def initialize
8
- @log = Logging.logger["CampfireBot::Plugin::Chuck"]
9
- end
10
-
11
- def chuck(msg)
12
- url = "http://www.chucknorrisfacts.com/all-chuck-norris-facts?page=#{rand(172)+1}"
13
- doc = Hpricot(open(url))
14
-
15
- facts = []
16
-
17
- (doc/".item-list a.createYourOwn").each do |a_tag|
18
- facts << CGI.unescapeHTML(a_tag.inner_html)
19
- end
20
-
21
- msg.speak(facts[rand(facts.size)])
22
- end
23
- end
@@ -1,51 +0,0 @@
1
- require 'open-uri'
2
- require 'hpricot'
3
- require 'tempfile'
4
-
5
-
6
- class Dilbert < CampfireBot::Plugin
7
- BASE_URL = 'http://dilbert.com/'
8
- START_DATE = Date.parse('1996-01-01')
9
-
10
- on_command 'dilbert', :dilbert
11
-
12
- def dilbert(msg)
13
- comic = case msg[:message].split(/\s+/)[0]
14
- when 'latest'
15
- fetch_latest
16
- when 'random'
17
- fetch_random
18
- when /d+/
19
- fetch_comic(msg[:message].split(/\s+/)[1])
20
- else
21
- fetch_random
22
- end
23
-
24
- msg.speak(BASE_URL + comic['src'])
25
-
26
- end
27
-
28
- private
29
-
30
- def fetch_latest
31
- fetch_comic
32
- end
33
-
34
- def fetch_random
35
- fetch_comic(rand(number_of_comics))
36
- end
37
-
38
- def fetch_comic(id = nil)
39
- # Rely on the comic being the last image on the page not nested
40
- (Hpricot(open("#{BASE_URL}fast#{'/' + id_to_date(id) + '/' if id}"))/'//img').last
41
- end
42
-
43
- def id_to_date(id)
44
- (START_DATE + id.days).to_date.to_s(:db)
45
- end
46
-
47
- def number_of_comics
48
- (Date.today - START_DATE).to_i
49
- end
50
-
51
- end
@@ -1,478 +0,0 @@
1
- class Excuse < CampfireBot::Plugin
2
-
3
- on_command 'excuse', :excuse
4
-
5
- def excuse(msg)
6
-
7
- excuses = %w(clock_speed
8
- solar_flares
9
- electromagnetic_radiation_from_satellite_debris
10
- static_from_nylon_underwear
11
- static_from_plastic_slide_rules
12
- global_warming
13
- poor_power_conditioning
14
- static_buildup
15
- doppler_effect
16
- hardware_stress_fractures
17
- magnetic_interference_from_money/credit_cards
18
- dry_joints_on_cable_plug
19
- we're_waiting_for_[the_phone_company]_to_fix_that_line
20
- sounds_like_a_Windows_problem,_try_calling_Microsoft_support
21
- temporary_routing_anomaly
22
- somebody_was_calculating_pi_on_the_server
23
- fat_electrons_in_the_lines
24
- excess_surge_protection
25
- floating_point_processor_overflow
26
- divide-by-zero_error
27
- POSIX_compliance_problem
28
- monitor_resolution_too_high
29
- improperly_oriented_keyboard
30
- network_packets_travelling_uphill_(use_a_carrier_pigeon)
31
- Decreasing_electron_flux
32
- first_Saturday_after_first_full_moon_in_Winter
33
- radiosity_depletion
34
- CPU_radiator_broken
35
- It_works_the_way_the_Wang_did,_what's_the_problem
36
- positron_router_malfunction
37
- cellular_telephone_interference
38
- techtonic_stress
39
- piezo-electric_interference
40
- (l)user_error
41
- working_as_designed
42
- dynamic_software_linking_table_corrupted
43
- heavy_gravity_fluctuation,_move_computer_to_floor_rapidly
44
- secretary_plugged_hairdryer_into_UPS
45
- terrorist_activities
46
- not_enough_memory,_go_get_system_upgrade
47
- interrupt_configuration_error
48
- spaghetti_cable_cause_packet_failure
49
- boss_forgot_system_password
50
- bank_holiday_-_system_operating_credits__not_recharged
51
- virus_attack,_luser_responsible
52
- waste_water_tank_overflowed_onto_computer
53
- Complete_Transient_Lockout
54
- bad_ether_in_the_cables
55
- Bogon_emissions
56
- Change_in_Earth's_rotational_speed
57
- Cosmic_ray_particles_crashed_through_the_hard_disk_platter
58
- Smell_from_unhygienic_janitorial_staff_wrecked_the_tape_heads
59
- Little_hamster_in_running_wheel_had_coronary;_waiting_for_replacement_to_be_Fedexed_from_Wyoming
60
- Evil_dogs_hypnotised_the_night_shift
61
- Plumber_mistook_routing_panel_for_decorative_wall_fixture
62
- Electricians_made_popcorn_in_the_power_supply
63
- Groundskeepers_stole_the_root_password
64
- high_pressure_system_failure
65
- failed_trials,_system_needs_redesigned
66
- system_has_been_recalled
67
- not_approved_by_the_FCC
68
- need_to_wrap_system_in_aluminum_foil_to_fix_problem
69
- not_properly_grounded,_please_bury_computer
70
- CPU_needs_recalibration
71
- system_needs_to_be_rebooted
72
- bit_bucket_overflow
73
- descramble_code_needed_from_software_company
74
- only_available_on_a_need_to_know_basis
75
- knot_in_cables_caused_data_stream_to_become_twisted_and_kinked
76
- nesting_roaches_shorted_out_the_ether_cable
77
- The_file_system_is_full_of_it
78
- Satan_did_it
79
- Daemons_did_it
80
- You're_out_of_memory
81
- There_isn't_any_problem
82
- Unoptimized_hard_drive
83
- Typo_in_the_code
84
- Yes,_yes,_its_called_a_design_limitation
85
- Look,_buddy:__Windows_3.1_IS_A_General_Protection_Fault.
86
- That's_a_great_computer_you_have_there;_have_you_considered_how_it_would_work_as_a_BSD_machine?
87
- Please_excuse_me,_I_have_to_circuit_an_AC_line_through_my_head_to_get_this_database_working.
88
- Yeah,_yo_mama_dresses_you_funny_and_you_need_a_mouse_to_delete_files.
89
- Support_staff_hung_over,_send_aspirin_and_come_back_LATER.
90
- Someone_is_standing_on_the_ethernet_cable,_causing_a_kink_in_the_cable
91
- Windows_95_undocumented_"feature"
92
- Runt_packets
93
- Password_is_too_complex_to_decrypt
94
- Boss'_kid_fucked_up_the_machine
95
- Electromagnetic_energy_loss
96
- Budget_cuts
97
- Mouse_chewed_through_power_cable
98
- Stale_file_handle_(next_time_use_Tupperware(tm)!)
99
- Feature_not_yet_implemented
100
- Internet_outage
101
- Pentium_FDIV_bug
102
- Vendor_no_longer_supports_the_product
103
- Small_animal_kamikaze_attack_on_power_supplies
104
- The_vendor_put_the_bug_there.
105
- SIMM_crosstalk.
106
- IRQ_dropout
107
- Collapsed_Backbone
108
- Power_company_testing_new_voltage_spike_(creation)_equipment
109
- operators_on_strike_due_to_broken_coffee_machine
110
- backup_tape_overwritten_with_copy_of_system_manager's_favourite_CD
111
- UPS_interrupted_the_server's_power
112
- The_electrician_didn't_know_what_the_yellow_cable_was_so_he_yanked_the_ethernet_out.
113
- The_keyboard_isn't_plugged_in
114
- The_air_conditioning_water_supply_pipe_ruptured_over_the_machine_room
115
- The_electricity_substation_in_the_car_park_blew_up.
116
- The_rolling_stones_concert_down_the_road_caused_a_brown_out
117
- The_salesman_drove_over_the_CPU_board.
118
- The_monitor_is_plugged_into_the_serial_port
119
- Root_nameservers_are_out_of_sync
120
- electro-magnetic_pulses_from_French_above_ground_nuke_testing.
121
- your_keyboard's_space_bar_is_generating_spurious_keycodes.
122
- the_real_ttys_became_pseudo_ttys_and_vice-versa.
123
- the_printer_thinks_its_a_router.
124
- the_router_thinks_its_a_printer.
125
- evil_hackers_from_Serbia.
126
- we_just_switched_to_FDDI.
127
- halon_system_went_off_and_killed_the_operators.
128
- because_Bill_Gates_is_a_Jehovah's_witness_and_so_nothing_can_work_on_St._Swithin's_day.
129
- user_to_computer_ratio_too_high.
130
- user_to_computer_ration_too_low.
131
- we_just_switched_to_Sprint.
132
- it_has_Intel_Inside
133
- Sticky_bits_on_disk.
134
- Power_Company_having_EMP_problems_with_their_reactor
135
- The_ring_needs_another_token
136
- new_management
137
- telnet:_Unable_to_connect_to_remote_host:_Connection_refused
138
- SCSI_Chain_overterminated
139
- It's_not_plugged_in.
140
- because_of_network_lag_due_to_too_many_people_playing_deathmatch
141
- You_put_the_disk_in_upside_down.
142
- Daemons_loose_in_system.
143
- User_was_distributing_pornography_on_server;_system_seized_by_FBI.
144
- BNC_(brain_not_connected)
145
- UBNC_(user_brain_not_connected)
146
- LBNC_(luser_brain_not_connected)
147
- disks_spinning_backwards_-_toggle_the_hemisphere_jumper.
148
- new_guy_cross-connected_phone_lines_with_ac_power_bus.
149
- had_to_use_hammer_to_free_stuck_disk_drive_heads.
150
- Too_few_computrons_available.
151
- Flat_tire_on_station_wagon_with_tapes.__("Never_underestimate_the_bandwidth_of_a_station_wagon_full_of_tapes_hurling_down_the_highway"_Andrew_S._Tannenbaum)_
152
- Communications_satellite_used_by_the_military_for_star_wars.
153
- Party-bug_in_the_Aloha_protocol.
154
- Insert_coin_for_new_game
155
- Dew_on_the_telephone_lines.
156
- Arcserve_crashed_the_server_again.
157
- Some_one_needed_the_powerstrip,_so_they_pulled_the_switch_plug.
158
- My_pony-tail_hit_the_on/off_switch_on_the_power_strip.
159
- Big_to_little_endian_conversion_error
160
- You_can_tune_a_file_system,_but_you_can't_tune_a_fish_(from_most_tunefs_man_pages)
161
- Dumb_terminal
162
- Zombie_processes_haunting_the_computer
163
- Incorrect_time_synchronization
164
- Defunct_processes
165
- Stubborn_processes
166
- non-redundant_fan_failure_
167
- monitor_VLF_leakage
168
- bugs_in_the_RAID
169
- no_"any"_key_on_keyboard
170
- root_rot
171
- Backbone_Scoliosis
172
- /pub/lunch
173
- excessive_collisions_&_not_enough_packet_ambulances
174
- le0:_no_carrier:_transceiver_cable_problem?
175
- broadcast_packets_on_wrong_frequency
176
- popper_unable_to_process_jumbo_kernel
177
- NOTICE:_alloc:_/dev/null:_filesystem_full
178
- pseudo-user_on_a_pseudo-terminal
179
- Recursive_traversal_of_loopback_mount_points
180
- Backbone_adjustment
181
- OS_swapped_to_disk
182
- vapors_from_evaporating_sticky-note_adhesives
183
- sticktion
184
- short_leg_on_process_table
185
- multicasts_on_broken_packets
186
- ether_leak
187
- Atilla_the_Hub
188
- endothermal_recalibration
189
- filesystem_not_big_enough_for_Jumbo_Kernel_Patch
190
- loop_found_in_loop_in_redundant_loopback
191
- system_consumed_all_the_paper_for_paging
192
- permission_denied
193
- Reformatting_Page._Wait...
194
- ..disk_or_the_processor_is_on_fire.
195
- SCSI's_too_wide.
196
- Proprietary_Information.
197
- Just_type_'mv_*_/dev/null'.
198
- runaway_cat_on_system.
199
- Did_you_pay_the_new_Support_Fee?
200
- We_only_support_a_1200_bps_connection.
201
- We_only_support_a_28000_bps_connection.
202
- Me_no_internet,_only_janitor,_me_just_wax_floors.
203
- I'm_sorry_a_pentium_won't_do,_you_need_an_SGI_to_connect_with_us.
204
- Post-it_Note_Sludge_leaked_into_the_monitor.
205
- the_curls_in_your_keyboard_cord_are_losing_electricity.
206
- The_monitor_needs_another_box_of_pixels.
207
- RPC_PMAP_FAILURE
208
- kernel_panic:_write-only-memory_(/dev/wom0)_capacity_exceeded.
209
- Write-only-memory_subsystem_too_slow_for_this_machine._Contact_your_local_dealer.
210
- Just_pick_up_the_phone_and_give_modem_connect_sounds._"Well_you_said_we_should_get_more_lines_so_we_don't_have_voice_lines."
211
- Quantum_dynamics_are_affecting_the_transistors
212
- Police_are_examining_all_internet_packets_in_the_search_for_a_narco-net-trafficker
213
- We_are_currently_trying_a_new_concept_of_using_a_live_mouse.__Unfortunately,_one_has_yet_to_survive_being_hooked_up_to_the_computer.....please_bear_with_us.
214
- Your_mail_is_being_routed_through_Germany_..._and_they're_censoring_us.
215
- Only_people_with_names_beginning_with_'A'_are_getting_mail_this_week_(a_la_Microsoft)
216
- We_didn't_pay_the_Internet_bill_and_it's_been_cut_off.
217
- Lightning_strikes.
218
- Of_course_it_doesn't_work._We've_performed_a_software_upgrade.
219
- Change_your_language_to_Finnish.
220
- Fluorescent_lights_are_generating_negative_ions._If_turning_them_off_doesn't_work,_take_them_out_and_put_tin_foil_on_the_ends.
221
- High_nuclear_activity_in_your_area.
222
- What_office_are_you_in?_Oh,_that_one.__Did_you_know_that_your_building_was_built_over_the_universities_first_nuclear_research_site?_And_wow,_aren't_you_the_lucky_one,_your_office_is_right_over_where_the_core_is_buried!
223
- The_MGs_ran_out_of_gas.
224
- The_UPS_doesn't_have_a_battery_backup.
225
- Recursivity.__Call_back_if_it_happens_again.
226
- Someone_thought_The_Big_Red_Button_was_a_light_switch.
227
- The_mainframe_needs_to_rest.__It's_getting_old,_you_know.
228
- I'm_not_sure.__Try_calling_the_Internet's_head_office_--_it's_in_the_book.
229
- The_lines_are_all_busy_(busied_out,_that_is_--_why_let_them_in_to_begin_with?).
230
- Jan__9_16:41:27_huber_su:_'su_root'_succeeded_for_...._on_/dev/pts/1
231
- It's_those_computer_people_in_X_{city_of_world}.__They_keep_stuffing_things_up.
232
- A_star_wars_satellite_accidently_blew_up_the_WAN.
233
- Fatal_error_right_in_front_of_screen
234
- That_function_is_not_currently_supported,_but_Bill_Gates_assures_us_it_will_be_featured_in_the_next_upgrade.
235
- wrong_polarity_of_neutron_flow
236
- Lusers_learning_curve_appears_to_be_fractal
237
- We_had_to_turn_off_that_service_to_comply_with_the_CDA_Bill.
238
- Ionization_from_the_air-conditioning
239
- TCP/IP_UDP_alarm_threshold_is_set_too_low.
240
- Someone_is_broadcasting_pygmy_packets_and_the_router_doesn't_know_how_to_deal_with_them.
241
- The_new_frame_relay_network_hasn't_bedded_down_the_software_loop_transmitter_yet._
242
- Fanout_dropping_voltage_too_much,_try_cutting_some_of_those_little_traces
243
- Plate_voltage_too_low_on_demodulator_tube
244
- You_did_wha..._oh__dear_....
245
- CPU_needs_bearings_repacked
246
- Too_many_little_pins_on_CPU_confusing_it,_bend_back_and_forth_until_10-20%_are_neatly_removed._Do__not__leave_metal_bits_visible!
247
- _Rosin__core_solder?_But...
248
- Software_uses_US_measurements,_but_the_OS_is_in_metric...
249
- The_computer_fleetly,_mouse_and_all.
250
- Your_cat_tried_to_eat_the_mouse.
251
- The_Borg_tried_to_assimilate_your_system._Resistance_is_futile.
252
- It_must_have_been_the_lightning_storm_we_had_(yesterday)_(last_week)_(last_month)
253
- Due_to_Federal_Budget_problems_we_have_been_forced_to_cut_back_on_the_number_of_users_able_to_access_the_system_at_one_time._(namely_none_allowed....)
254
- Too_much_radiation_coming_from_the_soil.
255
- Unfortunately_we_have_run_out_of_bits/bytes/whatever._Don't_worry,_the_next_supply_will_be_coming_next_week.
256
- Program_load_too_heavy_for_processor_to_lift.
257
- Processes_running_slowly_due_to_weak_power_supply
258
- Our_ISP_is_having_{switching,routing,SMDS,frame_relay}_problems
259
- We've_run_out_of_licenses
260
- Interference_from_lunar_radiation
261
- Standing_room_only_on_the_bus.
262
- You_need_to_install_an_RTFM_interface.
263
- That_would_be_because_the_software_doesn't_work.
264
- That's_easy_to_fix,_but_I_can't_be_bothered.
265
- Someone's_tie_is_caught_in_the_printer,_and_if_anything_else_gets_printed,_he'll_be_in_it_too.
266
- We're_upgrading_/dev/null
267
- The_Usenet_news_is_out_of_date
268
- Our_POP_server_was_kidnapped_by_a_weasel.
269
- It's_stuck_in_the_Web.
270
- Your_modem_doesn't_speak_English.
271
- The_mouse_escaped.
272
- All_of_the_packets_are_empty.
273
- The_UPS_is_on_strike.
274
- Neutrino_overload_on_the_nameserver
275
- Melting_hard_drives
276
- Someone_has_messed_up_the_kernel_pointers
277
- The_kernel_license_has_expired
278
- Netscape_has_crashed
279
- The_cord_jumped_over_and_hit_the_power_switch.
280
- It_was_OK_before_you_touched_it.
281
- Bit_rot
282
- U.S._Postal_Service
283
- Your_Flux_Capacitor_has_gone_bad.
284
- The_Dilithium_Crystals_need_to_be_rotated.
285
- The_static_electricity_routing_is_acting_up...
286
- Traceroute_says_that_there_is_a_routing_problem_in_the_backbone.__It's_not_our_problem.
287
- The_co-locator_cannot_verify_the_frame-relay_gateway_to_the_ISDN_server.
288
- High_altitude_condensation_from_U.S.A.F_prototype_aircraft_has_contaminated_the_primary_subnet_mask._Turn_off_your_computer_for_9_days_to_avoid_damaging_it.
289
- Lawn_mower_blade_in_your_fan_need_sharpening
290
- Electrons_on_a_bender
291
- Telecommunications_is_upgrading._
292
- Telecommunications_is_downgrading.
293
- Telecommunications_is_downshifting.
294
- Hard_drive_sleeping._Let_it_wake_up_on_it's_own...
295
- Interference_between_the_keyboard_and_the_chair.
296
- The_CPU_has_shifted,_and_become_decentralized.
297
- Due_to_the_CDA,_we_no_longer_have_a_root_account.
298
- We_ran_out_of_dial_tone_and_we're_and_waiting_for_the_phone_company_to_deliver_another_bottle.
299
- You_must've_hit_the_wrong_any_key.
300
- PCMCIA_slave_driver
301
- The_Token_fell_out_of_the_ring._Call_us_when_you_find_it.
302
- The_hardware_bus_needs_a_new_token.
303
- Too_many_interrupts
304
- Not_enough_interrupts
305
- The_data_on_your_hard_drive_is_out_of_balance.
306
- Digital_Manipulator_exceeding_velocity_parameters
307
- appears_to_be_a_Slow/Narrow_SCSI-0_Interface_problem
308
- microelectronic_Riemannian_curved-space_fault_in_write-only_file_system
309
- fractal_radiation_jamming_the_backbone
310
- routing_problems_on_the_neural_net
311
- IRQ-problems_with_the_Un-Interruptible-Power-Supply
312
- CPU-angle_has_to_be_adjusted_because_of_vibrations_coming_from_the_nearby_road
313
- emissions_from_GSM-phones
314
- CD-ROM_server_needs_recalibration
315
- firewall_needs_cooling
316
- asynchronous_inode_failure
317
- transient_bus_protocol_violation
318
- incompatible_bit-registration_operators
319
- your_process_is_not_ISO_9000_compliant
320
- You_need_to_upgrade_your_VESA_local_bus_to_a_MasterCard_local_bus.
321
- The_recent_proliferation_of_Nuclear_Testing
322
- Elves_on_strike._(Why_do_they_call_EMAG_Elf_Magic)
323
- Internet_exceeded_Luser_level,_please_wait_until_a_luser_logs_off_before_attempting_to_log_back_on.
324
- Your_EMAIL_is_now_being_delivered_by_the_USPS.
325
- Your_computer_hasn't_been_returning_all_the_bits_it_gets_from_the_Internet.
326
- You've_been_infected_by_the_Telescoping_Hubble_virus.
327
- Scheduled_global_CPU_outage
328
- Your_Pentium_has_a_heating_problem_-_try_cooling_it_with_ice_cold_water.(Do_not_turn_off_your_computer,_you_do_not_want_to_cool_down_the_Pentium_Chip_while_he_isn't_working,_do_you?)
329
- Your_processor_has_processed_too_many_instructions.__Turn_it_off_immediately,_do_not_type_any_commands!!
330
- Your_packets_were_eaten_by_the_terminator
331
- Your_processor_does_not_develop_enough_heat.
332
- We_need_a_licensed_electrician_to_replace_the_light_bulbs_in_the_computer_room.
333
- The_POP_server_is_out_of_Coke
334
- Fiber_optics_caused_gas_main_leak
335
- Server_depressed,_needs_Prozac
336
- quantum_decoherence
337
- those_damn_raccoons!
338
- suboptimal_routing_experience
339
- A_plumber_is_needed,_the_network_drain_is_clogged
340
- 50%_of_the_manual_is_in_.pdf_readme_files
341
- the_AA_battery_in_the_wallclock_sends_magnetic_interference
342
- the_xy_axis_in_the_trackball_is_coordinated_with_the_summer_solstice
343
- the_butane_lighter_causes_the_pincushioning
344
- old_inkjet_cartridges_emanate_barium-based_fumes
345
- manager_in_the_cable_duct
346
- We'll_fix_that_in_the_next_(upgrade,_update,_patch_release,_service_pack).
347
- HTTPD_Error_666_:_BOFH_was_here
348
- HTTPD_Error_4004_:_very_old_Intel_cpu_-_insufficient_processing_power
349
- The_ATM_board_has_run_out_of_10_pound_notes.__We_are_having_a_whip_round_to_refill_it,_care_to_contribute_?
350
- Network_failure_-__call_NBC
351
- Having_to_manually_track_the_satellite.
352
- Your/our_computer(s)_had_suffered_a_memory_leak,_and_we_are_waiting_for_them_to_be_topped_up.
353
- The_rubber_band_broke
354
- We're_on_Token_Ring,_and_it_looks_like_the_token_got_loose.
355
- Stray_Alpha_Particles_from_memory_packaging_caused_Hard_Memory_Error_on_Server.
356
- paradigm_shift...without_a_clutch
357
- PEBKAC_(Problem_Exists_Between_Keyboard_And_Chair)
358
- The_cables_are_not_the_same_length.
359
- Second-system_effect.
360
- Chewing_gum_on_/dev/sd3c
361
- Boredom_in_the_Kernel.
362
- the_daemons!_the_daemons!_the_terrible_daemons!
363
- I'd_love_to_help_you_--_it's_just_that_the_Boss_won't_let_me_near_the_computer._
364
- struck_by_the_Good_Times_virus
365
- YOU_HAVE_AN_I/O_ERROR_->_Incompetent_Operator_error
366
- Your_parity_check_is_overdrawn_and_you're_out_of_cache.
367
- Communist_revolutionaries_taking_over_the_server_room_and_demanding_all_the_computers_in_the_building_or_they_shoot_the_sysadmin._Poor_misguided_fools.
368
- Plasma_conduit_breach
369
- Out_of_cards_on_drive_D:
370
- Sand_fleas_eating_the_Internet_cables
371
- parallel_processors_running_perpendicular_today
372
- ATM_cell_has_no_roaming_feature_turned_on,_notebooks_can't_connect
373
- Webmasters_kidnapped_by_evil_cult.
374
- Failure_to_adjust_for_daylight_savings_time.
375
- Virus_transmitted_from_computer_to_sysadmins.
376
- Virus_due_to_computers_having_unsafe_sex.
377
- Incorrectly_configured_static_routes_on_the_corerouters.
378
- Forced_to_support_NT_servers;_sysadmins_quit.
379
- Suspicious_pointer_corrupted_virtual_machine
380
- It's_the_InterNIC's_fault.
381
- Root_name_servers_corrupted.
382
- Budget_cuts_forced_us_to_sell_all_the_power_cords_for_the_servers.
383
- Someone_hooked_the_twisted_pair_wires_into_the_answering_machine.
384
- Operators_killed_by_year_2000_bug_bite.
385
- We've_picked_COBOL_as_the_language_of_choice.
386
- Operators_killed_when_huge_stack_of_backup_tapes_fell_over.
387
- Robotic_tape_changer_mistook_operator's_tie_for_a_backup_tape.
388
- Someone_was_smoking_in_the_computer_room_and_set_off_the_halon_systems.
389
- Your_processor_has_taken_a_ride_to_Heaven's_Gate_on_the_UFO_behind_Hale-Bopp's_comet.
390
- it's_an_ID-10-T_error
391
- Dyslexics_retyping_hosts_file_on_servers
392
- The_Internet_is_being_scanned_for_viruses.
393
- Your_computer's_union_contract_is_set_to_expire_at_midnight.
394
- Bad_user_karma.
395
- /dev/clue_was_linked_to_/dev/null
396
- Increased_sunspot_activity.
397
- We_already_sent_around_a_notice_about_that.
398
- It's_union_rules._There's_nothing_we_can_do_about_it._Sorry.
399
- Interference_from_the_Van_Allen_Belt.
400
- Jupiter_is_aligned_with_Mars.
401
- Redundant_ACLs._
402
- Mail_server_hit_by_UniSpammer.
403
- T-1's_congested_due_to_porn_traffic_to_the_news_server.
404
- Data_for_intranet_got_routed_through_the_extranet_and_landed_on_the_internet.
405
- We_are_a_100%_Microsoft_Shop.
406
- We_are_Microsoft.__What_you_are_experiencing_is_not_a_problem;_it_is_an_undocumented_feature.
407
- Sales_staff_sold_a_product_we_don't_offer.
408
- Secretary_sent_chain_letter_to_all_5000_employees.
409
- Sysadmin_didn't_hear_pager_go_off_due_to_loud_music_from_bar-room_speakers.
410
- Sysadmin_accidentally_destroyed_pager_with_a_large_hammer.
411
- Sysadmins_unavailable_because_they_are_in_a_meeting_talking_about_why_they_are_unavailable_so_much.
412
- Bad_cafeteria_food_landed_all_the_sysadmins_in_the_hospital.
413
- Route_flapping_at_the_NAP.
414
- Computers_under_water_due_to_SYN_flooding.
415
- The_vulcan-death-grip_ping_has_been_applied.
416
- Electrical_conduits_in_machine_room_are_melting.
417
- Traffic_jam_on_the_Information_Superhighway.
418
- Radial_Telemetry_Infiltration
419
- Cow-tippers_tipped_a_cow_onto_the_server.
420
- tachyon_emissions_overloading_the_system
421
- Maintenance_window_broken
422
- We're_out_of_slots_on_the_server
423
- Computer_room_being_moved.__Our_systems_are_down_for_the_weekend.
424
- Sysadmins_busy_fighting_SPAM.
425
- Repeated_reboots_of_the_system_failed_to_solve_problem
426
- Feature_was_not_beta_tested
427
- Domain_controller_not_responding
428
- Someone_else_stole_your_IP_address,_call_the_Internet_detectives!
429
- It's_not_RFC-822_compliant.
430
- operation_failed_because:_there_is_no_message_for_this_error_(#1014)
431
- stop_bit_received
432
- internet_is_needed_to_catch_the_etherbunny
433
- network_down,_IP_packets_delivered_via_UPS
434
- Firmware_update_in_the_coffee_machine
435
- Temporal_anomaly
436
- Mouse_has_out-of-cheese-error
437
- Borg_implants_are_failing
438
- Borg_nanites_have_infested_the_server
439
- error:_one_bad_user_found_in_front_of_screen
440
- Please_state_the_nature_of_the_technical_emergency
441
- Internet_shut_down_due_to_maintenance
442
- Daemon_escaped_from_pentagram
443
- crop_circles_in_the_corn_shell
444
- sticky_bit_has_come_loose
445
- Hot_Java_has_gone_cold
446
- Cache_miss_-_please_take_better_aim_next_time
447
- Hash_table_has_woodworm
448
- Trojan_horse_ran_out_of_hay
449
- Zombie_processes_detected,_machine_is_haunted.
450
- overflow_error_in_/dev/null
451
- Browser's_cookie_is_corrupted_--_someone's_been_nibbling_on_it.
452
- Mailer-daemon_is_busy_burning_your_message_in_hell.
453
- According_to_Microsoft,_it's_by_design
454
- vi_needs_to_be_upgraded_to_vii
455
- greenpeace_free'd_the_mallocs
456
- Terrorists_crashed_an_airplane_into_the_server_room,_have_to_remove_/bin/laden._(rm_-rf_/bin/laden)
457
- astropneumatic_oscillations_in_the_water-cooling
458
- Somebody_ran_the_operating_system_through_a_spelling_checker.
459
- Rhythmic_variations_in_the_voltage_reaching_the_power_supply.
460
- Keyboard_Actuator_Failure.__Order_and_Replace.
461
- Packet_held_up_at_customs.
462
- Propagation_delay.
463
- High_line_impedance.
464
- Someone_set_us_up_the_bomb.
465
- Power_surges_on_the_Underground.
466
- Don't_worry;_it's_been_deprecated._The_new_one_is_worse.
467
- My_raccoon_has_hepatitis.
468
- )
469
-
470
- excuse = excuses[rand(excuses.size)].gsub("_", " ")
471
-
472
- msg.speak("Your excuse is: #{excuse}")
473
- end
474
-
475
-
476
- end
477
-
478
-