This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help with 2 TCL

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
S
SoUkSoU
Voice
Posts: 13
Joined: Sat Jan 11, 2014 1:35 pm

Help with 2 TCL

Post by SoUkSoU »

Hello. Im using this tcl " Holm News " for !commands in my bot.

Code: Select all

putlog "holm-news.tcl $ver by tw|ster (Stian Holm) loaded ..."

proc holm-pub_news {nick uhost handle channel text} {
global newsfile tellwho newschan
        if {(([lsearch -exact [string tolower $newschan] [string tolower $channel]] != -1) || ($newschan == "*"))} {
                if {![file exists "$newsfile"]} {
                        if {$tellwho} {
                                putserv "PRIVMSG $nick :.:error:. sorry, but i can't find the news file!"
                        } else {
                                putserv "NOTICE $nick :.:error:. sorry, but i can't find the news file!"
                        }
                return 0
                }
                if {![file readable "$newsfile"]} {
                        if {$tellwho} {
                                putserv "PRIVMSG $nick :.:error:. sorry, but i'm not allowed to read that file!"
                        } else {
                                putserv "NOTICE $nick :.:error:. sorry, but i'm not allowed to read that file!"
                        }
                return 0
                }
                set news [open "$newsfile" r]
                while {![eof $news]} {
                        set line [gets $news]
                        if {$tellwho} {
                                putserv "PRIVMSG $channel :$line"
                        } else {
                                putserv "NOTICE $nick :$line"
                        }
                }
        close $news
        }
The thing is that when the bot notice the user for the commands from a text file there is a delay in seconds.

Example:

Code: Select all

[04:59:49] -f1sh- ---
[04:59:50] -f1sh- Available Commands:
[04:59:51] -f1sh- !google <text> OR !google <country code> <text> # Desc: Searching in google
[04:59:52] -f1sh- !aq <text> # Desc: Add Quote
[04:59:54] -f1sh- !rq # Desc: Shows a random quote
[04:59:56] -f1sh- !images <image> OR !images <country code> <text> # Desc: Searching in google > images
[04:59:58] -f1sh- !imdb <movie> # Desc: Searching in imdb
[05:00:00] -f1sh- !seen <nick> # Desc: Last seen of nick
[05:00:02] -f1sh- !ip <ip> OR !ip -d <ip> OR !ip -g <ip> OR !ip -h <ip> # Desc: Information for the ip
[05:00:04] -f1sh- !news <text> OR !news <country code> <text> # Desc: Searcing news in google
[05:00:06] -f1sh- !wikipedia  <text> OR !wikipedia <country code> <text> # Desc: Searching in wikipedia
[05:00:08] -f1sh- !locate <ip> OR !locate < hostmask> # Desc: Information for the ip or hostmask
[05:00:11] -f1sh- # Country codes example:
[05:00:16] -f1sh- # Greece=gr
[05:00:18] -f1sh- # United Kingdom=uk
[05:00:20] -f1sh- # France=gr
[05:00:24] -f1sh- # End
[05:00:28] -f1sh- ---
Any way to fix this ?


And the second tcl is incith-google from speechles. My problem there is that i want to remove this:

Code: Select all

[05:02:21] <@f1sh> 12http://en.wikipedia.org/wiki/Egg (Requested by SoUkSoU)
Regards,
User avatar
heartbroken
Op
Posts: 110
Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there

Post by heartbroken »

about that "delay" -> http://eggwiki.org/Queues

and it doesn't looks like speechles's incith-google !wiki output ...

i'm already using it. and outputs like :

Code: Select all

 Eggdrop | Eggdrop is a popular IRC bot and the oldest still in active development. @ http://en.wikipedia.org/wiki/Eggdrop
probably, your bot has another one ?
Life iS Just a dReaM oN tHE wAy to DeaTh
S
SoUkSoU
Voice
Posts: 13
Joined: Sat Jan 11, 2014 1:35 pm

Help with 2 TCL

Post by SoUkSoU »

Im using:

UNOFFICIAL incith:google v2.1x
Post Reply