顯示具有 irc 標籤的文章。 顯示所有文章
顯示具有 irc 標籤的文章。 顯示所有文章

2014年11月3日 星期一

command line send message to IRC

#!/bin/bash

IRC_SERVER='irc.freenode.net'
IRC_PORT=6667
IRC_USERNAME='h4'
IRC_FULLNAME='h4'
IRC_NICK='h4'                                                                                                             
IRC_CHANNEL='#h4'

send_irc_message() {
    message=$1

    echo -e "USER $IRC_USERNAME 8 * : $IRC_FULLNAME\nNICK $IRC_NICK\nJOIN $IRC_CHANNEL\nPRIVMSG :$IRC_CHANNEL $1\nQUIT\n" | nc $IRC_SERVER $IRC_PORT
}

send_irc_message test





References :
ubuntu - Send message to IRC channel from bash - Server Fault
Nunca — Sending messages to an IRC server from a shell script (Bash)

訊息空格問題
sockets - IRC BOT (python) - Stack Overflow

2013年5月28日 星期二

qwebirc 安裝

1. 下載 qwebirc,并解壓縮
http://qwebirc.org/download

2. 安裝所需套件
# apt-get install python python-twisted python-twisted-bin python-twisted-core python-twisted-runner python-twisted-names python-twisted-mail python-twisted-words python-twisted-web python-zope.interface python-openssl openjdk-6 mercurial

 3. 修改 qwebirc 設定
# cp config.py.example config.py
# vi config.py

4. 編譯
#python compile.py

5. 執行 (無錯誤訊息則成功)
# python run.py




Reference :
Installation - the qwebirc project

2013年5月23日 星期四

irssi 設定

添加网络
/NETWORK ADD -kicks 4 -msgs 1 -modes 4 -whois 1 freenode

添加服务器
/SERVER ADD -auto -network freenode irc.freenode.net

添加想要自动加入的频道
/CHANNEL ADD -auto #h4 freenode

保存聊天记录
/LOG OPEN -autoopen -targets #h4 ~/logs/irc-svn-%Y%m%d.log

/SET autolog ON
/SET autolog_path ~/.irssi/irclog/$tag/$0-%Y%m%d.log
/save

下載 theme
$ cd ~/.irssi
$ wget http://www.irssi.org/themefiles/greenbox.theme

下載 script
$ mkdir ~/.irssi/scripts/autorun
$ cd ~/.irssi/scripts/autorun
My Favorite Irssi Scripts | chrisjohnston.org

adv_windowlist.pl
autorun
auto_whois.pl
dccstat.pl
go.pl
hilightwin.pl
history_search.pl
len.pl
messages_bottom.pl
nickcolor.pl
nicklist.pl
openurl.pl
queryresume.pl
screen_away.pl
scriptassist.pl
trackbar.pl
trackbar-soliton.pl
trigger.pl
usercount.pl
window_switcher.pl
xchatnickcolor.pl

設定 theme
/set theme greenbox
/save
nicklist.pl
/script load autorun/nicklist.pl
/set nicklist_automode SCREEN

hilightwin.pl
/script load autorun/hilightwin.pl
/window new split
/window name hilight
/window size 6
/layout save

adv_windowlist.pl
/script load autorun/adv_windowlist.pl
/statusbar window remove act
/set awl_display_key $Q%K|%n$H$C$S
/set awl_block -15

usercount.pl
/script load autorun/usercount.pl
/statusbar window add usercount



Reference :
lzy's 543: 用 screen + irssi 上 irc 之鄉民版教學 (含Q&A)
IRC by IRSSI, with Big5/UTF-8 recode [JeffHung.Blog]

Setting Up IRSSI on a Debian Server

irc no channel op

register user
/msg nickserv register YOURPASSWORD YOUREMAIL
if need change password ?
/msg NickServ SET nick PASSWORD oldpassword newpassword

create a channel (be a channel operator)
/j #test_channel 

register a channel
/msg ChanServ REGISTER #channel

list channel op users
/msg  chanserv access list #channel

recognize user
/msg NickServ IDENTIFY YOURPASSWORD 

chan op
/msg ChanServ ACCESS channel ADD nickname role
/msg ChanServ ACCESS #test_channel  ADD yan 10

auto identify
/NETWORK ADD -autosendcmd "/^msg NickServ IDENTIFY password;wait 2000" freenode




Reference :
ChanServ Commands - Foonetic
Serenity-IRC - ChanServ
Registering a channel on freenode | staffblog
IRC/Instructions - Meta

irssi auto-connect and auto-identify « boltblog 

2013年5月22日 星期三

hybserv Server Error: Server ID already exists.

hybserv error log
Thu May 23 13:28:47 2013 Connecting to 127.0.0.1[127.0.0.1] tcp/6667
Thu May 23 13:28:47 2013 Connected to 127.0.0.1 tcp/6667
Thu May 23 13:28:47 2013 Server Error: Server ID already exists.
Thu May 23 13:28:47 2013 Server Error: Closing Link: localhost (Server ID Exists)

hybserv success connect log
Thu May 23 13:39:05 2013 Opened log file successfully
Thu May 23 13:39:05 2013 Hybserv2 TS services version 1.9.4-release started
Thu May 23 13:39:05 2013 Databases loaded (0 registered nicknames, 0 registered channels, 0 memo entries)
Thu May 23 13:39:05 2013 Connecting to 127.0.0.1[127.0.0.1] tcp/6667
Thu May 23 13:39:05 2013 Connected to 127.0.0.1 tcp/6667
Thu May 23 13:39:05 2013 New Max Operator Count: 5


ircd-hybrid 的 server name 有重複到,把他改成不一樣的
# vi /etc/ircd-hybrid/ircd.conf
serverinfo {
        name = "example.com";
};

connect {
  name = "irc-services.example.com";
};

2013年5月21日 星期二

irc command

Connect
connect to a server
/connect irc_server_name

disconnects server
/disconnect irc_server_name

Channel
join to a channel
/j #channelname


leave channel
/wc
or
/part

Chat room
list windows
/window list

show user in channel
/who

set status in channel
/me waves hello

private chat with user
/msg user1 hello

change nickname
/nick user_2

Admin
login
/oper

Permissions
Gives channel ops to a user
/op user1

Removes channel ops from a user
/deop user1

Channel
set channel topic/topic Welcome to my channel

sets up a channel password

/mode #channel +k secret_password

Help
show help
/help

Hide join part messages
/ignore #channel MODES JOINS PARTS QUITS NICKS

or

/ignore -channels #channel1,#channel2,#channel3 * JOINS PARTS QUITS

no ignore
/unignore #channel MODES JOINS PARTS QUITS NICKS




Reference :
#Beginner - IRC Commands, the Basics
irc channel administration - Public: Concord Software Projects - Confluence
freenode: using the network