Skip to content

Commit 044d0e9

Browse files
committed
add system information plugin to collection
1 parent e4b675c commit 044d0e9

File tree

3 files changed

+34
-39
lines changed

3 files changed

+34
-39
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Philip Mayer
3+
Copyright (c) 2018 Philip Mayer ([email protected])
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

plugins/system.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This plugin shows user type, kernel and architecture of a linux distribution
2+
# please use this plugin only if you have a secure system configuration
3+
4+
class System < Plugin
5+
6+
def init(init)
7+
super
8+
logger("INFO: INIT plugin #{self.class.name}.")
9+
@@bot[:bot] = self
10+
return @@bot
11+
end
12+
13+
def name
14+
self.class.name
15+
end
16+
17+
def help(h)
18+
h << "<hr><span style='color:red;'>Plugin #{self.class.name}</span><br>"
19+
h << "<b>#{Conf.gvalue("main:control:string")}sysinfo</b> - information about operating system and mumble-server<br>"
20+
h
21+
end
22+
23+
def handle_chat(msg, message)
24+
super
25+
actor = msg.actor
26+
if message == "sysinfo"
27+
head = "<br><span style='color:lightblue;'>System information:</span><br>"
28+
os = %x( uname -smr ) + "<br>"
29+
messageto(actor, head+os)
30+
end
31+
end
32+
end
33+

plugins/tts.rb

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)