Jump to content

Admin commands from IRC


FNdanielNL

Recommended Posts

I have loaded the script (as .mrc file):

on 1:text:*:#testserver:{  
  if ( $nick isop #testserver )  { 
    if ( !kick isin $1 ) {  
      mta.kick 1 $2 
    } 
    if ( !freeze isin $1 ) {  
      mta.freeze 1 $2 
    } 
    if ( !unfreeze isin $1 ) {  
      mta.unfreeze 1 $2 
    } 
    if ( !mute isin $1 ) {  
      mta.mute 1 $2 
    } 
    if ( !unmute isin $1 ) {  
      mta.unmute 1 $2 
    } 
    elseif ( !restart isin $1 ) {  
      mta.text 1 Reconnecting MTA:mA. 
      mta.disconnect 1 
      mta.connect 1 
      .timer 1 1 mta.text 1 Reconnected 
    } 
    elseif ( !commands isin $1 ) {  
      /msg #testserver !kick, !(un)freeze, !(un)mute, !restart 
    } 
    else mta.text 1 $nick $+ : $1- 
  } 
} 

The commands !restart, !commands are working but the commands !mute, !unmute, !freeze, !unfreeze, !kick are not working.

I thought it has something to be in the menu Options (general > options) but this is not enabled for some kind of reason. ( i am using MTAma 4.0) But dunno :(

And no i dont try to use this commands from the same irc client, and have also already tried it from a other comp, and my status is @ on irc.

Link to comment
  • 6 months later...
  • 2 months later...

on 1:text:*:#testserver:{  
  if ( $nick isop #testserver )  { 
    if ( !kick isin $1 ) {  
      mta.kick 1 $2 
    } 
    if ( !freeze isin $1 ) {  
      mta.freeze 1 $2 
    } 
    if ( !unfreeze isin $1 ) {  
      mta.unfreeze 1 $2 
    } 
    if ( !mute isin $1 ) {  
      mta.mute 1 $2 
    } 
    if ( !unmute isin $1 ) {  
      mta.unmute 1 $2 
    } 
    elseif ( !restart isin $1 ) {  
      mta.text 1 Reconnecting MTA:mA. 
      mta.disconnect 1 
      mta.connect 1 
      .timer 1 1 mta.text 1 Reconnected 
    } 
    elseif ( !commands isin $1 ) {  
      /msg #testserver !kick, !(un)freeze, !(un)mute, !restart 
    } 
    else mta.text 1 $nick $+ : $1- 
  } 
} 

You can use here

alias getid {

var %a = 0

while (%a < %loop) {

if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a

!inc %a

}

}

And then make from the $2 $getid($1,$2)

like :

    if ( !kick isin $1 ) {  
      mta.kick 1 $2 
    } 

must be

    if ( !kick isin $1 ) {  
      mta.kick 1 $getid($1,$2) 
    } 

Link to comment
  • 3 weeks later...

Sorry to bump the topic for a few months, I also downloaded Lil_Toady's script, but It is not working for me, these are the only things I changed.

  set %echoserverid 1  
 set %echochan #insserver 

These are correct to me but it is still not messaging anything in the server. Please help.

Thanks,

-Ins

Link to comment

It works! :D Thanks, but the !kick/!ban/!freeze/!mute doesn't work :(, do I do those commands from IRC?

Also, I know I saw a topic somewhere about talking from IRC to ingame. Can you help me find it please?

Link to comment

Oh yes, it does work with !msg, but the !kick/!ban and other admin commands doesn't work?

Also it doesn't show when people do anything with ! infront of it in IRC or when someone does /me something.

Link to comment

those commands do work, but for anyone except yourself, also you should be an op on the chan.

Add this to the script:

on *:INPUT:%echochan:{ 
  if ($1 == !msg) mta.text %echoserverid $nick $+ : $2- 
  elseif ($nick isop %echochan) { 
    if ($1 == !kick) mta.kick %echoserverid $mta.getid(%echoserverid,$2) 
    elseif ($1 == !freeze) mta.freeze %echoserverid $mta.getid(%echoserverid,$2) 
    elseif ($1 == !unfreeze) mta.unfreeze %echoserverid $mta.getid(%echoserverid,$2) 
    elseif ($1 == !mute) mta.mute %echoserverid $mta.getid(%echoserverid,$2) 
    elseif ($1 == !unmute) mta.unmute %echoserverid $mta.getid(%echoserverid,$2) 
    elseif ($1 == !ban) mta.ban %echoserverid $mta.getid(%echoserverid,$2) 
  } 
} 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...