Jump to content

IRC script problems


Guest ESCU

Recommended Posts

i have tried this script so many times but it isnt work properly

on *:PART:#: {
 /mta.text 1 $nick ha dejado el IRC.
}
on *:JOIN:#: {
 /mta.text 1 $nick se ha conectado al IRC.
} 
on *:QUIT:{
 /mta.text 1 $nick ha salido del IRC.
}
on *:SIGNAL:mta.text:{ 
 /msg #test $mta.nick(1,$2) $+ :  1 $3- 

;	if ( IRC: !isin $1-) {
;		if (Admin isin $2) !msg #test $3-
;		else !msg #test $2-
;	}
}

on *:SIGNAL:mta.command:{
 /msg #test $mta.nick(1,$2) $+ :  $3-
}

on *:SIGNAL:mta.adcon:{
 /msg #test $mta.nick(1,$2) $+ : $3- 
}

on *:SIGNAL:mta.death:{
 /msg #test $mta.nick(1,$2) ha muerto
}

on *:SIGNAL:mta.freeze:{
 /msg #test $mta.nick(1,$2) Congelado
}

on *:SIGNAL:mta.join:{
 /msg #test $mta.nick(1,$2) se ha conectado
}

on *:SIGNAL:mta.mute:{
 /msg #test $mta.nick(1,$2) Muted
}

on *:SIGNAL:mta.nick:{
 /msg #test $mta.nick(1,$2) ha cambiado de nick
}

on *:SIGNAL:mta.part:{
 /msg #test $mta.nick(1,$2) ha dejado el juego
}

;on *:SIGNAL:mta.pm:{
;  /msg #test $mta.nick(1,$2) to $mta.nick($1,$3) $+ : $4-
;}


on *:text:*:#test:{
 mta.text 1 IRC: $nick $+ :  $1-
 if ($1 == !players) {
   var %a = 0,%b
   while (%a <= $mta.server(1).cmax) {
     if ($mta.nick(1,%a) != Unknown) %b = $iif(%b,%b $+ $chr(44) $mta.nick(1,%a),$mta.nick(1,%a))
     !inc %a
   }
   msg #test Jugadores: $iif(%b,$v1,Server vacio!)
 } 
 if ( $nick isop #test )  {
   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 Reconectando MTA:mA.
     mta.disconnect 1
     mta.connect 1
     .timer 1 1 mta.text 1 Reconectado
   }
   elseif ( !commands isin $1 ) {
     /msg #test !kick, !(un)freeze, !(un)mute, !restart
   }
 }
}

When someone types on irc channel the message is viwed on server but its repeated on chat room. Example (MTA-server, user1 on chat):

user1: hey players!

MTA-server: IRC: user1: hey players!

and on server it shows like: Admin: IRC: user1: hey players!

is in a separate mrc file loaded with prs1.2 and pgs. I have tried to detect IRC: on messages but nothing, no messages from server to chat room (irc to server yes) or "/msg unknown command" sometimes on mirc. When i modify the adcon or command signal the message isnt repeated on chat but then, i loose all the server messages to IRC. Any idea to fix?ty

Link to comment

u need to add a check into ur line on mta.text

u have:

/msg #test $mta.nick(1,$2) $+ :  1 $3- 

which will echo all text back to ur irc server,

u need to make it something like:

 if ( IRC: !isin $1-) /msg #test $mta.nick(1,$2) $+ :  1 $3- 

this will stop it echoing back.

Link to comment

thx but seems do not work

ive tested

if ( IRC: !isin $1-) /msg #test $mta.nick(1,$2) $+ :  1 $3-

and

if (Admin> IRC: !isin $1-) /msg #test $mta.nick(1,$2) $+ :  1 $3-

under the on mta.text signal but nothin works, i see my own echo when type on irc (im testing with other IRC client not the mirc itself where the scripts are loaded)

Similar code was tested on mta.command and mta.adcon signals stoping the echos but all the server->IRC messages too.

Link to comment

strange, i have this alias run from mta.text:

alias uva.echo {
 if ( IRC: !isin $1-) {
   if (*.*.* iswm $5) !msg #uva.echo  $3 $4
   elseif (Admin isin $2) !msg #uva.echo  $3-
   else !msg #uva.echo  $2-
 }
}

the top line was the only one needed, i just use the others for colours.

this works fine for me.

Link to comment

ive tried to add something like that on mta.mrc file, like you posted time ago about mta echo but didn work, maybe some mistakes or something, then i put all the script on a separate file and works with the echo problem.

Im using wine to launch mirc under linux, maybe this is the problem?ill test the same configuration with a windows pc to descart it.

Anyway, ty!

Link to comment
  • Recently Browsing   0 members

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