File: uname.py

package info (click to toggle)
weechat-scripts 20071011
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 400 kB
  • ctags: 377
  • sloc: python: 3,470; perl: 1,305; ruby: 270; makefile: 37
file content (18 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This script sends "uname -a" output to current channel.
# 	Just type /uname while chatting on some channel ;)

# 		by Stalwart <stlwrt doggy gmail.com>
#
# Released under GPL licence.

import weechat
from os import popen

def senduname(server, args):
	unameout = popen ('uname -a')
        uname = unameout.readline()
	weechat.command(uname[:-1])
	return 0

weechat.register ('uname', '1.0', '', """Sends "uname -a" output to current channel""")
weechat.add_command_handler ('uname', 'senduname')