|
|
| Author |
Message |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jan 13, 2010 3:46pm Post subject: Similair to NeoStats ConnectServ. |
|
|
Boredom resulted in this attempt at a ConnectServ.
on load:
- asks for a default channel, e.g: #nixtrixirc
- asks for a default server, e.g: irc.nixtrixirc.net
Monitors:
- Server splits
- Client connections(version & disconnection
- Oper up & chg commands
- Client changing nick
And:
- Also I have only tested this on unrealircd
- I have left comments inside the snippet so it is easier to read,
;x
| Code: |
on *:load:{
set %logchannel $$?="Choose log channel"
set %defserv $$?="Choose default server"
echo -a Log Channel Set To: %logchannel
echo -a Default Server Set To: %defserv
}
on 1:snotice:*:{
if ($server == %defserv) {
;CHG commands
if (changed the virtual hostname isin $1-) { msg %logchannel 10CHG:15 $1 14used /chghost on15 $7 14-=-15 $11 }
if (changed the virtual ident isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgident on15 $7 14-=-15 $11 }
if (changed the GECOS isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgname on15 $4 14-=-15 $10 }
;Nick Changes
if (has changed his/her nickname to isin $1-) { msg %logchannel 10Nick Change:15 $4 14-=-15 $11 }
;Connections
if (Client connecting on isin $4-) {
msg %logchannel 3Connection:15 $server 14-=-15 $9 $10
ctcp $9 version
}
if (exiting: == $5) { msg %logchannel 4Disconnection:15 $server 14-=-15 $6 $7 }
if (Client connecting at isin $4-) {
msg %logchannel 3Connection:15 $7 14-=-15 $8 $9
| ctcp version $8 version
}
if (exiting == $5) { msg %logchannel 15Disconnection:15 $7 14-=-15 $8 }
;Opers
if (is now a network administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is now a network admin 11(N) }
if (is now a services administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a services admin 11(a) }
if ( is now a server admin isin $1-) { msg %logchannel 10Oper:15 $1 14is a server admin 11(A) }
if ( is now a co administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a co admin 11(C) }
if (is now an operator isin $1-) { msg %logchannel 10Oper:15 $1 14is global operator 11(O) }
if (is now a local operator isin $1-) { msg %logchannel 10Oper:15 $1 14is local operator 11(o) }
if (Failed OPER attempt isin $1-) && ([unknown oper] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt:15 $5 14-=-15 $7- }
if (Failed OPER attempt isin $1-) && ([FAILEDAUTH] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt by15 $5 14using ID of15 $9 }
;Servers
if (Link == $4) && (is now synced isin $8-) { msg %logchannel 7Server15: $5 14is now linked to15 $7 }
if (Link denied for isin $1-) { msg %logchannel 7Server: 14Link denied for15 $7 | msg %logchannel 7-=-15 $8 $9 $10 $11 $12 $13 $14 $15 $16 | msg %logchannel 7-=-15 $17 }
if (Lost connection to isin $1-) { msg %logchannel 7Server:14 lost connection to15 $4 }
if (Received SQUIT isin $1-) { msg %logchannel 7Server:15 $6 7-=- 14SQUIT by15 $8 }
}
}
on 1:CTCPREPLY:VERSION*:/msg %logchannel 3Connection:15 $nick 14is using IRC client:15 $1-
|
|
|
| Back to top |
|
 |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jan 13, 2010 6:34pm Post subject: |
|
|
Updated:
- Removed random |
- Fixed disconnection colour
- Added gline/shun & kill & remove gline/shun
- Changed SQUIT, an if statement for a local server SQUIT and an if statement for an SQUIT on another server.
| Code: |
on *:load:{
set %logchannel $$?="Choose log channel"
set %defserv $$?="Choose default server"
echo -a Log Channel Set To: %logchannel
echo -a Default Server Set To: %defserv
}
on 1:snotice:*:{
if ($server == %defserv) {
;CHG commands
if (changed the virtual hostname isin $1-) { msg %logchannel 10CHG:15 $1 14used /chghost on15 $7 14-=-15 $11 }
if (changed the virtual ident isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgident on15 $7 14-=-15 $11 }
if (changed the GECOS isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgname on15 $4 14-=-15 $10 }
;Nick Changes
if (has changed his/her nickname to isin $1-) { msg %logchannel 10Nick Change:15 $4 14-=-15 $11 }
;Connections
if (Client connecting on isin $4-) {
msg %logchannel 3Connection:15 $server 14-=-15 $9 $10
ctcp $9 version
}
if (exiting: == $5) { msg %logchannel 4Disconnection:15 $server 14-=-15 $6 $7 }
if (Client connecting at isin $4-) {
msg %logchannel 3Connection:15 $7 14-=-15 $8 $9
ctcp version $8 version
}
if (exiting == $5) { msg %logchannel 4Disconnection:15 $7 14-=-15 $8 }
;Opers
if (is now a network administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is now a network admin 11(N) }
if (is now a services administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a services admin 11(a) }
if (is now a server admin isin $1-) { msg %logchannel 10Oper:15 $1 14is a server admin 11(A) }
if (is now a co administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a co admin 11(C) }
if (is now an operator isin $1-) { msg %logchannel 10Oper:15 $1 14is global operator 11(O) }
if (is now a local operator isin $1-) { msg %logchannel 10Oper:15 $1 14is local operator 11(o) }
if (Failed OPER attempt isin $1-) && ([unknown oper] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt:15 $5 14-=-15 $7- }
if (Failed OPER attempt isin $1-) && ([FAILEDAUTH] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt by15 $5 14using ID of15 $9 }
;Servers
if (Link == $4) && (is now synced isin $8-) { msg %logchannel 7Server15: $5 14is now linked to15 $7 }
if (Link denied for isin $1-) { msg %logchannel 7Server: 14Link denied for15 $7 | msg %logchannel 7-=-15 $8 $9 $10 $11 $12 $13 $14 $15 $16 | msg %logchannel 7-=-15 $17 }
if (Lost connection to isin $1-) { msg %logchannel 7Server:14 lost connection to15 $4 }
if (LocOps -- Received SQUIT isin $1-) { msg %logchannel 7Server:15 $6 7-=- 14SQUIT by15 $8 }
if (Received SQUIT isin $1-) && (Global isin $1-) { msg %logchannel 7Server:15 $8 7-=- 14SQUIT by15 $10 }
;Kill & Gline etc
if (received kill message isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Kill for15 $8 10-=-14 from15 $10 }
if (Permanent G:Line added isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Gline added for15 $6 10-=-15 $14 $15 14 $16- 15) }
if (removed G:line isin $1-) { msg %logchannel 10Oper:14 Gline for15 $4 14has been removed by15 $1 15) }
if (Permanent Shun added for isin $1-) { msg %logchannel 10Oper:14 Shun added for15 $6 19-=-15 $14 $15 14 $16- 15) }
if (removed Shun isin $1-) { msg %logchannel 10Oper:14 Shun for15 $4 14has been removed by15 $1 15) }
}
}
on 1:CTCPREPLY:VERSION*:/msg %logchannel 3Connection:15 $nick 14is using IRC client:15 $1-
|
|
|
| Back to top |
|
 |
PingBad Post Whore

Joined: 05 Feb 2005 Posts: 3001 Location: New Zealand
|
Posted: Jan 14, 2010 2:40am Post subject: |
|
|
Nice script I assume that script is UnrealIRCd specific?
btw, I notice you've added G:Line/shun support - but how about k:lines, z:lines and global z:lines? Not everyone uses G:Line  |
|
| Back to top |
|
 |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jan 14, 2010 5:55am Post subject: |
|
|
Yeah I said that in the first post
| Code: |
And:
- Also I have only tested this on unrealircd
|
I will evetually add more to this, as I said also it was just something I done out of pure boredom, and because of the locops and global snotices you receive i'm trying to ensure this is totally bug free as it is, that's why you'll notice two if statements for the same thing \o/
thanks though  |
|
| Back to top |
|
 |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jan 14, 2010 6:00am Post subject: |
|
|
Here's an example:
| Code: |
<Corinthian> Disconnection: irc.Zapto.org: -=- tgl!Who@92.41.88.183.sub.mbb.three.co.uk
<Corinthian> Oper: Bertrum[Away] is now a network admin (N)
<Corinthian> Oper: Gline added for *@*test.* -=- (from Bertrum[Away]!Who@Staff.Zapto.org: no
<Corinthian> Oper: Gline for *@*test.* has been removed by Bertrum[Away]!Who@Staff.Zapto.org )
<Corinthian> CHG: Bertrum used /chghost on Bertrum -=- testing.vhost.net
<Corinthian> Oper: Shun added for *@test.com -=- (from Bertrum[Away]!Who@Staff.Zapto.org: no
<Corinthian> Oper: Shun for *@*test.* has been removed by Bertrum!Admin@NixtrixIRC.net )
<Corinthian> Server: irc.zapto.org -=- SQUIT by Bertrum[Away][localhost]
|
|
|
| Back to top |
|
 |
Trixar_za Eleet

Joined: 10 Dec 2006 Posts: 613 Location: South Africa
|
Posted: Jan 14, 2010 6:00am Post subject: |
|
|
I'm also assuming the bot needs to be opered with all the snomasks set hey Good work though
EDIT: Er, If I remember correctly, Locals can set ALL snomasks - local AND global ones  |
|
| Back to top |
|
 |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jan 14, 2010 6:32am Post subject: |
|
|
well Trixar this isn't Hawkee.com I didn't think I needed to state that ;x
snomasks: +cfFkvGnNso
^^ shows kills/glines/shuns/connects/nick changes/servers
;x |
|
| Back to top |
|
 |
Bertrum Eleet

Joined: 30 Mar 2008 Posts: 569 Location: Venus
|
Posted: Jul 27, 2011 3:36pm Post subject: |
|
|
| PingBad wrote: | Nice script I assume that script is UnrealIRCd specific?
btw, I notice you've added G:Line/shun support - but how about k:lines, z:lines and global z:lines? Not everyone uses G:Line  |
I actually added those updates on Hawkee in like February 2010, but here is an update of it here for anybody who uses it (I noticed this thread had a lot of views so I thought I should update it)
| Code: |
on *:load:{
set %logchannel $$?="Choose log channel"
set %defserv $$?="Choose default server"
echo -a Log Channel Set To: %logchannel
echo -a Default Server Set To: %defserv
echo -a REMEMBER: give the bot these snomasks: +cfFkvGnNsoS
}
on 1:snotice:*:{
if ($server == %defserv) {
;CHG commands
if (changed the virtual hostname isin $1-) { msg %logchannel 10CHG:15 $1 14used /chghost on15 $7 14-=-15 $11 }
if (changed the virtual ident isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgident on15 $7 14-=-15 $11 }
if (changed the GECOS isin $1-) { msg %logchannel 10CHG:15 $1 14used /chgname on15 $4 14-=-15 $10 }
;Nick Changes
if (has changed his/her nickname to isin $1-) { msg %logchannel 10Nick Change:15 $4 14-=-15 $11 }
;Connections
if (Client connecting on isin $4-) {
msg %logchannel 3Connection:15 $server 14-=-15 $9 $10
ctcp $9 version
}
if (exiting: == $5) { msg %logchannel 4Disconnection:15 $server 14-=-15 $6 $7 }
if (Client connecting at isin $4-) {
msg %logchannel 3Connection:15 $7 14-=-15 $8 $9
ctcp version $8 version
}
if (exiting == $5) { msg %logchannel 4Disconnection:15 $7 14-=-15 $8 }
;Opers
if (is now a network administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is now a network admin 11(N) }
if (is now a services administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a services admin 11(a) }
if (is now a server admin isin $1-) { msg %logchannel 10Oper:15 $1 14is a server admin 11(A) }
if (is now a co administrator isin $1-) { msg %logchannel 10Oper:15 $1 14is a co admin 11(C) }
if (is now an operator isin $1-) { msg %logchannel 10Oper:15 $1 14is global operator 11(O) }
if (is now a local operator isin $1-) { msg %logchannel 10Oper:15 $1 14is local operator 11(o) }
if (Failed OPER attempt isin $1-) && ([unknown oper] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt:15 $5 14-=-15 $7- }
if (Failed OPER attempt isin $1-) && ([FAILEDAUTH] isin $1-) { msg %logchannel 10Oper: 14Failed oper attempt by15 $5 14using ID of15 $9 }
;Servers
if (Link == $4) && (is now synced isin $8-) { msg %logchannel 7Server15: $5 14is now linked to15 $7 }
if (Link denied for isin $1-) { msg %logchannel 7Server: 14Link denied for15 $7 | msg %logchannel 7-=-15 $8 $9 $10 $11 $12 $13 $14 $15 $16 | msg %logchannel 7-=-15 $17 }
if (Lost connection to isin $1-) { msg %logchannel 7Server:14 lost connection to15 $4 }
if (LocOps -- Received SQUIT isin $1-) { msg %logchannel 7Server:15 $6 7-=- 14SQUIT by15 $8 }
if (Received SQUIT isin $1-) && (Global isin $1-) { msg %logchannel 7Server:15 $8 7-=- 14SQUIT by15 $10 }
;Kill \ Kline \ Zline \ Gline \ Spamfilter add|del|match spam filter \ shun
if (received kill message isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Kill for15 $8 10-=-14 from15 $10 }
if (Permanent G:Line added isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Gline added for15 $6 10-=-15 $14 $15 14 $16- 15) }
if (removed G:line isin $1-) { msg %logchannel 10Oper:14 Gline for15 $4 14has been removed by15 $1 15) }
if (Permanent Shun added for isin $1-) { msg %logchannel 10Oper:14 Shun added for15 $6 19-=-15 $14 $15 14 $16- 15) }
if (removed Shun isin $1-) { msg %logchannel 10Oper:14 Shun for15 $4 14has been removed by15 $1 15) }
if (Spamfilter Added: isin $1-) { msg %logchannel 10Oper:14 Spamfilter added for:15 $4 10-=-14 added by15 $18 $19 }
if (removed Spamfilter isin $1-) { msg %logchannel 10Oper:14 Spamfilter for:15 $4 10-=-14 has been removed by15 $1 }
if ([Spamfilter] isin $1-) && ( matches filter isin $1-) { echo @snotice 10Oper:14 $2 10-=-Met the spamfilter for:15 $6 10-=- at $fulldate }
if (Permanent K:Line added isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Kline added for:15 $6 10-=-14 added by15 $14 $15 14 $16- 15) }
if (removed K:line isin $1-) { msg %logchannel 10Oper:14 Kline for:15 $4 14has been removed by15 $1 15) }
if (Permanent Z:Line added isin $1-) { .timer 1 1 msg %logchannel 10Oper:14 Zline added for:15 $6 10-=-14 added by15 $14 $15 14 $16- 15) }
if (removed Z:line isin $1-) { msg %logchannel 10Oper:14 Zline for:15 $4 14has been removed by15 $1 15) }
}
}
on 1:CTCPREPLY:VERSION*:/msg %logchannel 3Connection:15 $nick 14is using IRC client:15 $1-
|
And for future updates, and for the InspIRCd version which I will soon add to Hawkee (And in a new thread here) keep tabs on this page: http://www.hawkee.com/snippet/7149/ |
|
| Back to top |
|
 |
|