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

Joined: 13 Jan 2002 Posts: 1057 Location: France
|
Posted: Wed May 25, 2022 5:59 am Post subject: Anyone already use picoirc package ? |
|
|
Hi there,
I'm trying to use picoirc but I can't have any result.
I probably misunderstood how it works, so if anyone knows...
My (actual) try:
Code: | package require picoirc
proc test {} {
set myirc [::picoirc::connect cbirc testor "irc://irc.zeolia.net/test"]
}
proc cbirc {context state args} {
puts "Callback is here with $args"
switch $state {
init {
puts "Initialized with $context"
}
connect {
puts "connected ?"
::picoirc::post $context "/join #test2"
}
close {
puts "Well, close with $args"
}
debug {
puts "D --> $args"
}
default {
puts $state
}
}
} |
And when using:
Code: | crazycat@dev:~$ tclsh
% source ircclient.tcl
% test
Callback is here with
Initialized with ::picoirc::irc1
::picoirc::irc1 |
And nothing appear in IRC, neither in my ircd logs... _________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1057 Location: France
|
Posted: Wed May 25, 2022 7:37 am Post subject: |
|
|
Ok, here is the answer
Quote: | 13:23:35 <mjanssen> CrazyCat: your eventloop is not running
13:23:54 <mjanssen> instead of directly calling test do after 10 test ; vwait forever
13:24:17 <CrazyCat> mjanssen> oh ? let me try that
13:24:18 <mjanssen> after 10 test ; will schedule the call to test as soon as the eventloop starts running
13:24:29 <mjanssen> vwait forever ; will start the event loop
13:26:34 <CrazyCat> oh yes it works ! |
_________________ https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
Back to top |
|
 |
|
|
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
|
|