| View previous topic :: View next topic |
| Author |
Message |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Aug 11, 2007 8:56 pm Post subject: |
|
|
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 |
|
 |
Evil Voice
Joined: 10 May 2007 Posts: 17
|
Posted: Mon Sep 17, 2007 1:33 pm Post subject: |
|
|
| 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 .. 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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
Evil Voice
Joined: 10 May 2007 Posts: 17
|
Posted: Tue Sep 18, 2007 10:14 am Post subject: |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Sep 18, 2007 4:25 pm Post subject: |
|
|
Go to the first page of this topic and check the edited code. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Evil Voice
Joined: 10 May 2007 Posts: 17
|
Posted: Wed Sep 19, 2007 11:55 am Post subject: |
|
|
ok i tested with your edited code but it is not working
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 |
|
 |
|