egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help echo script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
harry1
Voice


Joined: 26 Feb 2006
Posts: 2

PostPosted: Sun Feb 26, 2006 1:54 pm    Post subject: help echo script Reply with quote

i have already a script who make echo of some word but il would like to make an echo of only certain nickname(with usernane on irc) .can someone could put an line in my script for that please?

exemple : if roger (~Tatian4@*******abo.*****.fr) says hello it will make on echo on my second chan.

sorry i'm french and my englsih is very bad

Code:

# Liste des mots à intercepter (séparé par des espaces)
set wordlist "bla bla joli merde "

# Chan où le bot capture ls phrase selon les mots
set chan1 "#w****"

# Chan ù le bot enverra les phrases
set chan2 "#z**"

bind pubm -|- "* *" capture:word

proc capture:word {nick host hand chan arg} {
   if { [string tolower $chan] != [string tolower $::chan1] } { return 0 }
   
   foreach word $::wordlist {
      if { [lsearch -exact $arg $word] > -1 } {
         puthelp "PRIVMSG $::chan2 :\[$nick\] $arg"
         break
      }
   }
   
   return
}


Moderator edit: added 'code' .. please check Things to do before posting..
Back to top
View user's profile Send private message
Caribou
Voice


Joined: 15 Apr 2004
Posts: 28
Location: France

PostPosted: Sun Feb 26, 2006 3:58 pm    Post subject: Reply with quote

Salut, je suis français aussi Very Happy

Je pense que tu peux rajouter un foreach avec une deuxieme liste mais cette fois une liste de nom à intercepter, en reprenant le principe de ton script, mais uniquement le pseudo ou le host aussi compte ?
(I think you can add another foreach with a second list but this time for the names to intercept, reusing the same system for words, but you want only names or hosts too ?)

Uniquement le pseudo ça donnerait :
(Only the nickname will make : )

Code:
# Liste des mots à intercepter (séparé par des espaces)
set wordlist "bla bla joli merde"

# Liste de noms à intercepter (séparé par des espaces)
set namelist "roger pierre patrice"

# Chan où le bot capture ls phrase selon les mots
set chan1 "#w****"

# Chan ù le bot enverra les phrases
set chan2 "#z**"

bind pubm -|- "* *" capture:word

proc capture:word {nick host hand chan arg} {
  if { [string tolower $chan] != [string tolower $::chan1] } { return 0 }

  foreach name $::namelist {
    if { [lsearch -exact $nick $name] > -1 } {
      foreach word $::wordlist {
        if { [lsearch -exact $arg $word] > -1 } {
          puthelp "PRIVMSG $::chan2 :\[$nick\] $arg"
          break
        }
      }
    }
  }

  return

}
Back to top
View user's profile Send private message
harry1
Voice


Joined: 26 Feb 2006
Posts: 2

PostPosted: Sun Feb 26, 2006 4:13 pm    Post subject: Reply with quote

j aimerai le host name et le nick pour etre sur que c bien le bon gars et avoir le bon echo.car j aimerai vraiment ke ca me copie vraiment toute les frase comportant des mot precis ke les mec disent meme kan eux meme font des echo ou des msg truc du genre.



i'd like the host and the nick to be sure to have the good guys:)

merci

ps: mon autre probleme c que j aimerai me connecter a un server ssl avec mon eggdrop . sqi vous avez une solution aussi Smile car me dis requette dns echoue Smile merci
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber