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 

Script Problem for a simple copy script
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Aug 11, 2007 8:56 pm    Post subject: Reply with quote

Oh, I didn't understand what you meant by those bots. zigana's suggestion should match them all.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Evil
Voice


Joined: 10 May 2007
Posts: 17

PostPosted: Mon Sep 17, 2007 1:33 pm    Post subject: Reply with quote

Sir_Fz wrote:
Code:
set targChan #zielchannel
set srcChan #quellchannel
set newsBot {GWNEWS-[01][1-5]}

set namesList {
 name1
 name2
 name3
}

bind pubm - * forward:pubm

proc forward:pubm {n uh h chan t} {
 global targChan srcChan newsBot namesList
 if {[string equal -nocase $srcChan $chan]} {
  if {[regexp -nocase $newsBot $n]} {
   foreach nm $namesList {
    if {![string match -nocase *$nm* $t]} {continue}
    putmsg $targChan "$n: $t"
    break
   }
  }
 }
}

Edit: Fixed bug.
Edit2: Changed matching method to regexp for newsBot.



the script works nice with one to four names but it is not wok with 50 names Smile.. than the bot start to posts all news and not only the news with
the namens list.

did you have an idea to fix that ?

BR/Ralf
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Sep 17, 2007 4:40 pm    Post subject: Reply with quote

I've edited the code, try it now.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Evil
Voice


Joined: 10 May 2007
Posts: 17

PostPosted: Tue Sep 18, 2007 10:14 am    Post subject: Reply with quote

I am not sure what you change but it is the same. The bot forward the complete news and not only the news from the namenslist

here are the complete code.



Quote:
set targChan #xgc-news
set srcChan #gwnews.global
set newsBot {gwnews-[01][1-5]}

set namesList {
Evil One
Sandsturm
Masters
GeisteskrankePsychopaten
Wazzup
United Chemikers
becks4all
Vipers
Amplified
Saufköppe
BWG
Cherusker
D4YW4LK3RS
The All Stars
The_Pretorians
Hornet
The Unknown Giants
Feng Sushi
bandito
Stormfront
39 Boys
P.F.C.
Gertsch`s Gäng
The Scotsmen
Flügelstuzer
Sanitöter
nudelholz-bande
TeilzeitMafiosi
DVC
Holy Sanctuary
Magicans
Die tigers
Knastbrüder AG
unsynetic
DeutscheGangJäger
ogame
Bande der Zeitlosen
Thok´ra
Ruff Raider
rebell treter
united fraggers
willis-gang
Kenjis-God-Gang
RusskajaMafia
Bongomen

}

bind pubm - * forward:pubm

proc forward:pubm {n uh h chan t} {
global targChan srcChan newsBot namesList
if {[string equal -nocase $srcChan $chan]} {
if {[regexp -nocase $newsBot $n]} {
foreach nm $namesList {
if {![string match -nocase *$nm* $t]} {continue}
putmsg $targChan "$n: $t"
break
}
}
}
}
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Sep 18, 2007 4:25 pm    Post subject: Reply with quote

Go to the first page of this topic and check the edited code.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Evil
Voice


Joined: 10 May 2007
Posts: 17

PostPosted: Wed Sep 19, 2007 11:55 am    Post subject: Reply with quote

ok i tested with your edited code but it is not working Sad
he forward the complete news not from the nameslist.

did it helps to see the message ? like

gwnews-01: Server03 -> Genf: Die angolakoennt hat den Die Doktoren ein(e,en) Versteck abgenommen.

my bot have to check the green and red name. Comes a name from the nameslist in the message, forward that my bot in my channel.

Thanks again for help
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 -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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