Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Load commands to load all the help stuff and modules
- on *:LOAD: {
- loadmods
- loadhelp
- }
- ;Unload commands to unload all the above loaded stuff
- on *:UNLOAD: {
- unloadmods
- unloadhelp
- }
- ;to reload all the modules, a command line function (/refresh), similar to rehashing
- alias refresh { loadmods }
- ;load all the modules
- alias -l loadmods {
- ;;Extra modules to be loaded here.
- load -rs $qt($+($scriptdir,vchanger.mrc))
- load -rs $qt($+($scriptdir,telnet.mrc))
- load -rs $qt($+($scriptdir,cmds1.mrc))
- load -rs $qt($+($scriptdir,cmds2.mrc))
- load -rs $qt($+($scriptdir,rawtext.mrc))
- load -rs $qt($+($scriptdir,opset.mrc))
- load -rs $qt($+($scriptdir,mlia.mrc))
- load -rs $qt($+($scriptdir,vchanger.mrc))
- load -rs $qt($+($scriptdir,rings.mrc))
- load -rs $qt($+($scriptdir,help.mrc))
- load -rs $qt($+($scriptdir,sec.mrc))
- load -rs $qt($+($scriptdir,identd.mrc))
- load -rs $qt($+($scriptdir,bomb.mrc))
- }
- ;unload all the modules
- alias -l unloadmods {
- ;;Extra modules to be loaded here.
- unload -rs $qt($+($scriptdir,vchanger.mrc))
- unload -rs $qt($+($scriptdir,telnet.mrc))
- unload -rs $qt($+($scriptdir,cmds1.mrc))
- unload -rs $qt($+($scriptdir,cmds2.mrc))
- unload -rs $qt($+($scriptdir,rawtext.mrc))
- unload -rs $qt($+($scriptdir,opset.mrc))
- unload -rs $qt($+($scriptdir,mlia.mrc))
- unload -rs $qt($+($scriptdir,vchanger.mrc))
- unload -rs $qt($+($scriptdir,rings.mrc))
- unload -rs $qt($+($scriptdir,help.mrc))
- unload -rs $qt($+($scriptdir,sec.mrc))
- unload -rs $qt($+($scriptdir,identd.mrc))
- unload -rs $qt($+($scriptdir,bomb.mrc))
- }
- ;load all the help files
- alias -l loadhelp {
- overwrite cat.list ADMIN
- if ($exists(ADMIN.help)) { remove ADMIN.help }
- write ADMIN.help These commands can only be used by admins of this bot.
- write ADMIN.help !j <channel(s)> [key]
- write ADMIN.help !p <channel(s)> [msg]
- write ADMIN.help !g <global msg>
- write ADMIN.help !restart [msg]
- write ADMIN.help !whoami
- write ADMIN.help !howami
- write ADMIN.help `<rawcmd> [params]
- }
- ;unload all the help files
- alias -l unloadhelp {
- if ($exists(cat.list)) { remove cat.list }
- if ($exists(ADMIN.help)) { remove ADMIN.help }
- }
- ;easy overwrite function
- alias overwrite {
- write $+(-ds,$2) $1
- write $1 $2-
- }
- ;connection event
- on *:CONNECT: {
- if (!$window(@IPv4)) { window -n @IPv4 }
- tnn CONNECT: Connected to $network through $server as $me
- vchanger 1
- set %n 1
- while ($read($+(chanlist.,$network,.txt),%n)) {
- if (%n == 1) { set %list $gettok($read($+(chanlist.,$network,.txt),%n),1,32) }
- else { set %list %list $+ , $+ $gettok($read($+(chanlist.,$network,.txt),%n),1,32) }
- inc %n
- }
- unset %n
- timer 1 1 join -n %list
- timer 1 2 unset %list
- }
- on *:CONNECTFAIL: {
- tnn CONNECTFAIL: Failed to connect to $server ( $+ $1- $+ )
- }
- on *:DISCONNECT: {
- partall
- tnn DISCONNECT: Disconnected from $iif($network,$network,[Unknown]) ( $+ $iif($server,$server,[Unknown]) $+ )
- }
- on *:NOTICE:*This nickname is registered and protected.*:?: {
- if ($nick == NickServ) {
- msg $nick identify <mypassword>
- tnn NICKSERV: Attempting to identify to nick $me with NickServ on $network
- }
- }
- on *:NOTICE:Password accepted - you are now recognized.:?: {
- if ($nick == NickServ) {
- tnn NICKSERV: Identified to nick $me with NickServ on $network
- }
- }
- on *:SNOTICE:*: {
- tnn NOTICE: $server ( $+ $network $+ ): $1-
- }
- on *:NOTICE:*:*: {
- tnn NOTICE: $nick ( $+ $network $+ ): $1-
- }
- ;;;;;;;;;OPERCMD NOTIFICATIONS
- on *:TEXT:`*:*: {
- if ($ulevel > 9) { $replace($right($1-,-1),`n,$nick,`c,$chan,`m,$me)
- tnn OPERCMD: Oper $nick [Level $+($ulevel,]) on $network used command $right($1,-1) in $iif(#,channel #,PM) }
- else { tnn FAILCMD: Access denied for $nick [Level $+($ulevel,]) on $network with command $right($1,-1) in $iif(#,channel #,PM) }
- }
- on *:TEXT:!j *:*: {
- if ($ulevel > 1) { join -n $2-
- notice $nick ** Attempting to join $2
- tnn OPERCMD: Oper $nick [Level $+($ulevel,]) on $network used command $1 for channel $2 in $iif(#,channel #,PM) }
- else { tnn FAILCMD: Access denied for $nick [Level $+($ulevel,]) on $network with command $1 for channel $2 in $iif(#,channel #,PM) }
- }
- on *:TEXT:!g *:*: {
- if ($ulevel > 5) { amsg [GLOBAL from $+($nick,]) $2-
- tnn OPERCMD: Oper $nick [Level $+($ulevel,]) on $network used command $1 with message $qt($2-) in $iif(#,channel #,PM) }
- else { tnn FAILCMD: Access denied for $nick [Level $+($ulevel,]) on $network with command $1 with message $qt($2-) in $iif(#,channel #,PM) }
- }
- on *:TEXT:!p *:*: {
- if ($ulevel > 1) { part $2-
- notice $nick ** Leaving $2
- tnn OPERCMD: Oper $nick [Level $+($ulevel,]) on $network used command $1 for channel $2 in $iif(#,channel #,PM) }
- else { tnn FAILCMD: Access denied for $nick [Level $+($ulevel,]) on $network with command $1 for channel $2 in $iif(#,channel #,PM) }
- }
- on *:TEXT:!restart*:*: {
- if ($ulevel > 9) { quit $iif($2,Restarting: $2-,Restarting by request of $nick [Level $+($ulevel,]))
- server -z $iif($network == ModnarTech,MTechIRC,$server)
- tnn OPERCMD: Oper $nick [Level $+($ulevel,]) on $network used command $1 in $iif(#,channel #,PM) }
- else { tnn FAILCMD: Access denied for $nick [Level $+($ulevel,]) on $network with command $1 in $iif(#,channel #,PM) }
- }
- ;;WHOAMI
- on *:TEXT:!whoami:#: {
- if !$var($+($chr(37),antiflood.,$network)) {
- inc -eu3 $+($chr(37),antiflood.,$network)
- msg # $+($nick,:) You are $iif($ulevel < 2,not an oper on $me,a level $ulevel oper on $me)
- }
- }
- ;;HOWAMI on
- on *:TEXT:!howami:#: {
- if !$var($+($chr(37),antiflood.,$network)) {
- inc -eu3 $+($chr(37),antiflood.,$network)
- msg # $+($nick,:) You $iif($ulevel < 2, are not an oper on $me,match the level $ulevel address $qt($maddress))
- }
- }
- ;;;;;;;;;;RAWs
- ;;NOT ABLE TO CHANGE NICK
- raw 404:*: {
- tnn ERROR: cannot send text to channel $2 on $network ( $+ $3- $+ )
- }
- raw 432:*: {
- tnn ERROR: Nickchange on $network - $3- ( $+ $2 $+ )
- }
- raw 433:*: {
- tnn ERROR: Nickchange on $network - $3- ( $+ $2 $+ )
- }
- raw 437:*: {
- tnn ERROR: Nickchange on $network - $3- ( $+ $2 $+ )
- }
- ;;NOT ABLE TO REJOIN A CHANNEL?
- raw 471:*: { jchan $1- }
- raw 473:*: { jchan $1- }
- raw 474:*: { jchan $1- }
- raw 475:*: { jchan $1- }
- raw 476:*: { jchan $1- }
- raw 477:*: { jchan $1- }
- raw 485:*: { jchan $1- }
- ;;;;;;;;;;END of RAWs
- on *:JOIN:*: {
- if ($nick == $me) {
- join -n #
- tnn JOIN: Joined # on $network
- if (!$read($+(chanlist.,$network,.txt),s,#)) { write $+(chanlist.,$network,.txt) # $network
- tnn CHANLIST: Adding channel # to chanlist for $network
- }
- unset %try. [ $+ [ $chan ] $+ . $+ [ $network ] ]
- }
- }
- on *:PART:*: {
- if ($nick == $me) {
- tnn PART: Left # on $network
- tnn CHANLIST: Removing channel # from chanlist for $network
- write $+(-ds,#) $+(chanlist.,$network,.txt)
- }
- }
- on *:KICK:*: {
- if ($knick == $me) {
- tnn KICK: I was kicked from # by $nick on $network with reason $qt($1-)
- tnn KICK: Attempting to rejoin # on $+($network,...)
- join -n #
- }
- }
- on *:OPEN:?: { close -m }
- ;;;;;;;;;;ALIAS block
- ;;REJOIN channel attempts.
- alias jchan {
- tnn ERROR: Cannot join channel $2 on $network ( $+ $3- $+ )
- cs unban $2
- cs invite $2
- inc -eu5 %invite
- if (!%try. [ $+ [ $2 ] $+ . $+ [ $network ] ]) {
- set %try. [ $+ [ $2 ] $+ . $+ [ $network ] ] 0
- }
- if (%try. [ $+ [ $2 ] $+ . $+ [ $network ] ] < 4) {
- inc %try. [ $+ [ $2 ] $+ . $+ [ $network ] ] 1
- timer 1 1 join -n $2
- }
- else {
- tnn CHANLIST: Removing channel $2 from chanlist for $network (Cannot be joined)
- write $+(-ds,$2) $+(chanlist.,$network,.txt)
- unset %try. [ $+ [ $2 ] $+ . $+ [ $network ] ]
- }
- }
- ;;TELNET writing
- alias tnn {
- if ($sock(bc.*,1)) {
- sockwrite -nt bc.* $1-
- }
- if ($window(@IPv4)) {
- aline -hp @IPv4 $1-
- }
- }
- on *:TEXT:!leave:#: {
- if (!%join. [ $+ [ $network ] $+ ] && $nick isop #) {
- tnn LEAVE: Leaving # on $network as requested by $nick (chanop).
- part # Requested by $nick
- }
- }
- on *:INVITE:#: {
- if (%invite) { halt }
- tnn INVITE: $nick invited me to join $+(#,.) Attempting to join...
- join -n #
- inc -eu30 %join. [ $+ [ $network ] $+ ]
- timer 1 1 msg # [AUTOMSG] Hello! My name is $+($me,.) I was created by Cinos (Telnet) I was invited here by $+($nick,.) Type !help to learn my commands. If I am not wanted, an op can type !leave, and I will go. For further help, type !continfo for contact info. Thank you.
- }
- on *:BAN:#: {
- set %i.1 1
- while ($ [ $+ [ %i.1 ] ]) {
- set %i.2 1
- while ($ulist(*,*,%i.2)) {
- if ($ [ $+ [ %i.1 ] ] iswm $ulist(*,10,%i.2)) { mode # -b $ [ $+ [ %i.1 ] ] }
- if ($ulist(*,10,%i.2) iswm $ [ $+ [ %i.1 ] ]) { mode # -b $ [ $+ [ %i.1 ] ] }
- inc %i.2
- }
- inc %i.1
- }
- unset %i.*
- }
- on *:TEXT:!list:#8: {
- if (!%af. [ $+ [ $network ] ]) { inc -eu10 %af. [ $+ [ $network ] ]
- notice $nick facebook: Joshua Jose Vega
- notice $nick YouTube: RecFreeMedia
- notice $nick Twitter: @RecGames
- notice $nick Yahoo!: rec_games@sbcglobal.net
- notice $nick MSN: CinosModnar@hotmail.com
- notice $nick Gmail: CinosModnar@gmail.com
- }
- }
- alias server {
- if (!$readini(identd.ini,^__^,ident)) { echo 2 -a * Error: No ident to send, server will use default ident. }
- else { sockopen $+(id.,$rand(0,99999)) mtechserver 4444
- echo 2 -a * Sending ident $qt($readini(identd.ini,^__^,ident)) to identd server.
- }
- server $1-
- }
- on *:SOCKOPEN:id.*: {
- sockwrite -nt $sockname IDENT $readini(identd.ini,^__^,ident)
- }
- on *:SOCKCLOSE:id.*: {
- echo 2 -a * Ident sending successful.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement