This file is indexed.

/usr/share/doc/libnet-irc-ruby/examples/bot.rb is in libnet-irc-ruby 0.14-5.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env ruby

=begin header
an example of IRC Bot

  $Author: knu $
  $Date: 2001/01/31 10:55:28 $

  Copyright (C) 1998-2000 Hiroshi IGARASHI
=end

# Thread.abort_on_exception = true  # for debug
$LOAD_PATH << File::dirname(__FILE__)
require 'parsearg'
require 'irc/client'

################################################################
$USAGE = "usage"
def usage
  leprint(<<"USAGE_END")
usage: #{$0} --server <server name> [<options>]
options:
    --operator <operator>
    --nick <nick>
    --username <username>
    --realname <realname>
    --agentname <agentname>
    --logfile <logfile>
USAGE_END
end
parseArgs(0, "server", "",
	  "server:", "logfile:", "nick:", "operator:", "username:", "realname:", "agentname:")
Server = $OPT_server
Operator = $OPT_operator || "igapon!igarashi@mahon.ueda.info.waseda.ac.jp"
Nick = $OPT_nick || "rubot"
UserName = $OPT_username || "rubot"
RealName = $OPT_realname || "Ruby Robot"
AgentName = $OPT_agentname || "init"
#LogFileName = $OPT_logfile || "syslog"
################################################################

STDOUT.sync = true
STDERR.sync = true
bot = IRC::Client::new(Server, Nick, UserName, RealName)
bot.start(AgentName)