Example #1
0
def timer():
	win = irssi.active_win()
	if win.active and win.active_server:
		sock = open(statfile, "a")
		sock.write("%s%s %s\n" % (int(time.time()), win.active_server.tag, win.active.name))
		sock.close()
	irssi.timeout_add(1000*60, timer)
Example #2
0
def cmd_wintest(data, server, witem):
    act_win = irssi.active_win()
    act_server = irssi.active_server()

    print "active_win", act_win, "ref", act_win.refnum
    print "active_server", act_server

    items = act_win.items()
    print "win.items()", items

    for i in items:
        print i, "window ref", i.window().refnum, "window name", i.window().name

    print
    print "all windows"
    for i in irssi.windows():
        print "window refnum", i.refnum, "window name", i.name
    print

    f0 = irssi.window_find_name("melbo")
    f1 = irssi.window_find_name("(status)")
    print "irssi.window_find_name(melbo)", f0
    print "irssi.window_find_name(status)", f1
Example #3
0
def cmd_wintest(data, server, witem):
    act_win = irssi.active_win()   
    act_server = irssi.active_server()   

    print 'active_win', act_win, 'ref', act_win.refnum
    print 'active_server', act_server

    items = act_win.items()
    print 'win.items()', items

    for i in items:
        print i, 'window ref', i.window().refnum, 'window name', i.window().name

    print
    print 'all windows'
    for i in irssi.windows():
        print 'window refnum', i.refnum, 'window name', i.name
    print

    f0 = irssi.window_find_name('melbo')
    f1 = irssi.window_find_name('(status)') 
    print 'irssi.window_find_name(melbo)', f0
    print 'irssi.window_find_name(status)', f1