Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Dear people
- ;i couldn't convert this into a willie module due to special events like on DNS and raw 302, so i just left it as mirc
- ;i've set up a few variables
- ;that will make this easier
- ;NOTE::: the user MUST be an operator of the channel due to gamesurge's configuration.
- ;----------
- ;|FEATURES|
- ;----------
- ;ip list stored in %appdata%\mIRC (goodips.txt)
- ;operators add/remove people
- ;manual autovoice preference
- ;-------
- ;|USAGE|
- ;-------
- ;add people !av [name of person]
- ;remove people !rv [name of person]
- ;manual usage !autovoice [on/off]
- ;should be used with channel modes +m, and chanserv as "!set givevoice 100"
- on *:start: {
- set -e %WantedNickName botname
- set -e %AltNickName alternate
- set -e %channelname #yourchannel
- set -e %username authserv username
- set -e %password authserv password
- nick %WantedNickName
- set -e %checknicktaken t
- server irc.gamesurge.net 6667
- .timercheck 1 15 checknicktaken
- }
- alias checknicktaken {
- if (%checknicktaken == t) {
- nick %AltNickName
- server irc.gamesurge.net 6667
- }
- }
- on *:connect: {
- set -e %checknicktaken f
- authserv auth %username %password
- authserv set autofake on
- umode +x
- join %channelname
- }
- alias scanip {
- set -u20 %scanning.for $1
- set -u20 %scan.active $true
- set -u20 %chan $chan($active)
- set -u20 %st $nick( %chan ,0)
- set -u20 %sp 1
- .userhost $1
- set -u20 %nick.ip $1
- }
- alias scan.nick {
- set -u20 %scan.nick $true
- userhost %nick.ip
- }
- raw 302:*:{
- if (%scan.active) || (%scan.nick) {
- set -u20 %nickhost $2
- scan.for.match
- }
- }
- alias scan.for.match {
- tokenize 64 %nickhost
- set -u20 %curr.nick $1
- set -u20 %toknickhost $2
- tokenize 61 %curr.nick
- set -u20 %current.nick $1
- .dns %toknickhost
- }
- on 1:DNS:{
- if (!$dns(1).ip) {
- afterscan %nick.ip %toknickhost
- unset %scan.nick
- halt
- }
- afterscan %nick.ip $dns(1).ip
- unset %scan.nick
- halt
- }
- alias afterscan {
- if (%scantype == add) {
- write goodips.txt $2
- mode %channelname +v $1
- echo -a added $1 ( $2 )
- }
- if (%scantype == check) {
- if (!$read(goodips.txt,$2)) { echo -a $1 $2 | return }
- echo -a checked $1
- mode %channelname +v $1
- }
- if (%scantype = rem) {
- write -ds $+ $2 goodips.txt
- mode %channelname -v $1
- echo -a removed $1
- }
- }
- on *:join:*: {
- if (%mode == on) {
- set -e %scantype check
- scanip $nick
- }
- }
- on *:mode:*: {
- if ($chr(109) isin $1-) {
- if ($chr(43) isin $1-) {
- set -e %mode on
- msg %channelname Auto-voice is now ON. turn it off by "!autovoice off"
- return
- }
- if ($chr(45) isin $1-) {
- set -e %mode off
- msg %channelname Auto-voice is now OFF. turn it on by "!autovoice on"
- return
- }
- }
- }
- on *:text:!autovoice*:*: {
- if ($nick !isop %channelname) { return }
- if ($2 == off) {
- set -e %mode off
- msg %channelname Auto-voice is now OFF. turn it off by "!autovoice off"
- }
- if ($2 == on) {
- set -e %mode on
- msg %channelname Auto-voice is now ON. turn it off by "!autovoice off"
- }
- }
- on *:text:!av*:*: {
- if ($nick !isop $chan) { return }
- set -e %scantype add
- scanip $2
- }
- on *:text:!rv*:*: {
- if ($nick !isop $chan) { return }
- set -e %scantype rem
- scanip $2
- }
Advertisement
Add Comment
Please, Sign In to add comment